Date: Sun, 29 Jun 2008 11:40:03 GMT From: Shunsuke SHINOMIYA <shino@fornext.org> To: freebsd-net@FreeBSD.org Subject: Re[2]: kern/125003: incorrect EtherIP header format. Message-ID: <200806291140.m5TBe3QL040356@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/125003; it has been noted by GNATS. From: Shunsuke SHINOMIYA <shino@fornext.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: thompsa@FreeBSD.org, freebsd-bugs@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re[2]: kern/125003: incorrect EtherIP header format. Date: Sun, 29 Jun 2008 20:38:51 +0900 --------_4867660B00000000A846_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, > Could you let me know if the following patch solves your symptom or > not? It can be applied to 8.x and 7.x: > > http://people.allbsd.org/~hrs/FreeBSD/gif.diff Thank you. I applied your patch to RELENG_6_3 and modified netinet6/in6_gif.c manually(because of tab expansion?). I had 2 problems. One is syntax error around `eip_ver:4,' when BYTE_ORDER is LITTELE_ENDIAN. Another one is 2 octet padding for struct etherip_header. To solve this, I specified __packed attribute for this structure. Attached patch based on yours is for RELENG_6_3. Patched implementation works well with IX2015. 192.168.2.37: FreeBSD box 192.168.2.128: IX2015 20:22:55.540804 IP 192.168.2.128 > 192.168.2.37: etherip 76 0x0000: 4500 0060 076b 0000 4061 ecdc c0a8 0280 0x0010: c0a8 0225 3000 **** **** **** **** **** 0x0020: **** 0800 4500 003c 0cc0 0000 8001 a82e 0x0030: c0a8 0281 c0a8 0201 0800 4753 0001 0608 0x0040: 6162 6364 6566 6768 696a 6b6c 6d6e 6f70 0x0050: 7172 20:22:55.541815 IP 192.168.2.37 > 192.168.2.128: etherip 76 0x0000: 4500 0060 3511 0000 1e61 e136 c0a8 0225 0x0010: c0a8 0280 3000 **** **** **** **** **** 0x0020: **** 0800 4500 003c 319b 0000 4001 c353 0x0030: c0a8 0201 c0a8 0281 0000 4f53 0001 0608 0x0040: 6162 6364 6566 6768 696a 6b6c 6d6e 6f70 0x0050: 7172 -- Shunsuke SHINOMIYA <shino@fornext.org> --------_4867660B00000000A846_MULTIPART_MIXED_ Content-Type: application/octet-stream; name="gif6.diff" Content-Disposition: attachment; filename="gif6.diff" Content-Transfer-Encoding: base64 LS0tIG5ldC9pZl9naWYuaC5vcmlnCTIwMDYtMDItMDEgMDA6NTY6NDYuMDAwMDAwMDAwICswOTAw CisrKyBuZXQvaWZfZ2lmLmgJMjAwOC0wNi0yOSAxOTozNjo0MC4wMDAwMDAwMDAgKzA5MDAKQEAg LTkzLDEyICs5MywxNyBAQAogI2RlZmluZQlNVEFHX0dJRl9DQUxMRUQJMAogCiBzdHJ1Y3QgZXRo ZXJpcF9oZWFkZXIgewotCXVfaW50OF90IGVpcF92ZXI7CS8qIHZlcnNpb24vcmVzZXJ2ZWQgKi8K LQl1X2ludDhfdCBlaXBfcGFkOwkvKiByZXF1aXJlZCBwYWRkaW5nIGJ5dGUgKi8KLX07Ci0jZGVm aW5lIEVUSEVSSVBfVkVSX1ZFUlNfTUFTSyAgIDB4MGYKLSNkZWZpbmUgRVRIRVJJUF9WRVJfUlNW RF9NQVNLICAgMHhmMAotI2RlZmluZSBFVEhFUklQX1ZFUlNJT04gICAgICAgICAweDAzCisjaWYg QllURV9PUkRFUiA9PSBMSVRUTEVfRU5ESUFOCisJdV9pbnQJZWlwX3Jlc3ZsOjQsCS8qIHJlc2Vy dmVkICAqLworCQllaXBfdmVyOjQ7CS8qIHZlcnNpb24gKi8KKyNlbmRpZgorI2lmIEJZVEVfT1JE RVIgPT0gQklHX0VORElBTgorCXVfaW50CWVpcF92ZXI6NCwJLyogdmVyc2lvbiAqLworCQllaXBf cmVzdmw6NDsJLyogcmVzZXJ2ZWQgICovCisjZW5kaWYKKwl1X2ludDhfdCBlaXBfcmVzdmg7CS8q IHJlc2VydmVkICAqLworfSBfX3BhY2tlZDsKKyNkZWZpbmUgRVRIRVJJUF9WRVJ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BQ Uk9UT19FVEhFUklQOwotIAkJZWlwaGRyLmVpcF92ZXIgPSBFVEhFUklQX1ZFUlNJT04gJiBFVEhF UklQX1ZFUl9WRVJTX01BU0s7Ci0gCQllaXBoZHIuZWlwX3BhZCA9IDA7CisgCQllaXBoZHIuZWlw X3ZlciA9IEVUSEVSSVBfVkVSU0lPTjsKKyAJCWVpcGhkci5laXBfcmVzdmwgPSAwOworIAkJZWlw aGRyLmVpcF9yZXN2aCA9IDA7CiAgCQkvKiBwcmVwZW5kIEV0aGVybmV0LWluLUlQIGhlYWRlciAq LwogIAkJTV9QUkVQRU5EKG0sIHNpemVvZihzdHJ1Y3QgZXRoZXJpcF9oZWFkZXIpLCBNX0RPTlRX QUlUKTsKICAJCWlmIChtICYmIG0tPm1fbGVuIDwgc2l6ZW9mKHN0cnVjdCBldGhlcmlwX2hlYWRl cikpCg== --------_4867660B00000000A846_MULTIPART_MIXED_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806291140.m5TBe3QL040356>