[PATCH] proxyarp for shaper device, kernel 2.4.9

Roberto Arcomano (berto@fatamorgana.com)
Tue, 11 Sep 2001 13:43:29 +0200


--------------Boundary-00=_HWXHTST8WHJXCZEEN6DC
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi,
This patch should corrects proxy arp feature in shaper devices forcing kernel
checking (before sending ARP REPLY) for "physical" device (i.e. eth0) instead
of "shaper" device (i.e. shaper0): in this way we avoid useless ARP REPLY and
"IP CONFLICT" messages on client hosts.
More details in "readme.txt" file attached.

I already tested it for many days and it has been worked well.
Thank you for your great support.
Best Regards
Roberto arcomano

--------------Boundary-00=_HWXHTST8WHJXCZEEN6DC
Content-Type: text/x-c;
charset="iso-8859-1";
name="patch-proxyarp-2.4.9"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="patch-proxyarp-2.4.9"

ZGlmZiAtdXIgbGludXgtMi40Ljkub3JpZy9kcml2ZXJzL25ldC9zaGFwZXIuYyBsaW51eC0yLjQu
OS9kcml2ZXJzL25ldC9zaGFwZXIuYwotLS0gbGludXgtMi40Ljkub3JpZy9kcml2ZXJzL25ldC9z
aGFwZXIuYwlUaHUgSnVuIDI4IDAyOjEwOjU1IDIwMDEKKysrIGxpbnV4LTIuNC45L2RyaXZlcnMv
bmV0L3NoYXBlci5jCVR1ZSBTZXAgMTEgMTM6MjA6MDkgMjAwMQpAQCAtNjcwLDYgKzY3MCw3IEBA
CiAJZGV2LT5hZGRyX2xlbgkJPSAwOwogCWRldi0+dHhfcXVldWVfbGVuCT0gMTA7CiAJZGV2LT5m
bGFncwkJPSAwOworCWRldi0+ZmVhdHVyZXMJCXw9IE5FVElGX0ZfU0hBUEVSOwogCQkKIAkvKgog
CSAqCVNoYXBlciBpcyBvawpkaWZmIC11ciBsaW51eC0yLjQuOS5vcmlnL2luY2x1ZGUvbGludXgv
aWZfc2hhcGVyLmggbGludXgtMi40LjkvaW5jbHVkZS9saW51eC9pZl9zaGFwZXIuaAotLS0gbGl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3MmUlRDRl9ETkFUKSB8fAotCQkJICAgIChhZGRyX3R5cGUgPT0gUlROX1VOSUNB
U1QgICYmIHJ0LT51LmRzdC5kZXYgIT0gZGV2ICYmCisJCQkgICAgKGFkZHJfdHlwZSA9PSBSVE5f
VU5JQ0FTVCAgJiYgCisJCQkgICAgKCAoKHNoZmxhZykgJiYgKCAoKHN0cnVjdCBzaGFwZXIgKikg
cnQtPnUuZHN0LmRldi0+cHJpdiktPmRldiAhPSBkZXYpKSB8fCAoKCFzaGZsYWcpICYmIChydC0+
dS5kc3QuZGV2ICE9IGRldikpICkgJiYKIAkJCSAgICAgKElOX0RFVl9QUk9YWV9BUlAoaW5fZGV2
KSB8fCBwbmVpZ2hfbG9va3VwKCZhcnBfdGJsLCAmdGlwLCBkZXYsIDApKSkpIHsKIAkJCQluID0g
bmVpZ2hfZXZlbnRfbnMoJmFycF90YmwsIHNoYSwgJnNpcCwgZGV2KTsKIAkJCQlpZiAobikK

--------------Boundary-00=_HWXHTST8WHJXCZEEN6DC
Content-Type: text/plain;
charset="iso-8859-1";
name="readme.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="readme.txt"

U3ViamVjdDogUEFUQ0ggdG8gdXBkYXRlIHByb3h5IGFycCBmZWF0dXJlIG9uIHNoYXBlciBkZXZp
Y2UKCkF1dGhvcjogUm9iZXJ0byBBcmNvbWFubywgYmVydG9AZmF0YW1vcmdhbmEuY29tLAogICAg
ICAgIGh0dHA6Ly93d3cuZmF0YW1vcmdhbmEuY29tL2JlcnRvbGludXgKCkRhdGU6IDkvOS8yMDAx
CgpEZXNjcmlwdGlvbjogU2hhcGVyIGRldmljZSBpcyBzZWVuIGJ5IHRoZSBrZXJuZWwgbGlrZSBh
IAogICAgICAgICAgICAgZGlmZmVyZW50IGRldmljZSAoaS5lLiBzaGFwZXIwKSB0aGFuIHRoZSAK
CSAgICAgcGh5c2ljYWwgb25lIChpLmUuIGV0aDApICB0byB3aGljaCBpcyBhdHRhY2hlZDo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SBhcnAgYW5kIHNoYXBlciBlbmFibGVkLCB3aXRoIENMSUVOVDEKICAgICAgIHJlYWNoYWJsZSB2
aWEgc2hhcGVyMC4KICAgICAgIFdpdGggY2xhc3NpYyBwcm94eSBhcnAsIHdoZW4gSSB0dXJuIG9u
IENMSUVOVCBtYWNoaW5lIEkgCiAgICAgICByZWNlaXZlIGFuICJJUCBjb25mbGl0IiBmcm9tIE9T
LCB3aGlsZSB1c2luZyBwYXRjaGVkIHZlcnNpb24gCiAgICAgICB0aGVyZSBhcmUgbm8gcHJvYmxl
bXMuCiAgICAgICBQcm94eSBhcnAgc3RpbGwgZG9lcyBpdHMgd29yayBjYXVzZSwgaWYgSSBnaXZl
IENMSUVOVDIgSVAKICAgICAgIGFkZHJlc3MgdG8gQ0xJRU5UMSBtYWNoaW5lLCBJIHJlY2VpdmUg
KGZyb20gQ0xJRU5UMSBPUykgYQogICAgICAgSVAgYnVzeSBtZXNzYWdlLgoKICAgICAgIEFsc28g
dGVzdHMgb24gY29tbWVyY2lhbCBzZXJ2ZXIgaGF2ZSBiZWVuIGRvbmUgd2l0aCBnb29kCiAgICAg
ICByZXN1bHRzLgoKICAgICAgIEtlcm5lbCB2ZXJzaW9uIHRlc3RlZCBpcyAyLjQuOQogICAgICAg
CgpGaW5hbCBub3RlczogSXQgc2hvdWxkIGJlIHZlcnkgc2ltcGxlIHRvIHBvcnQgcGF0Y2ggdG8g
b2xkZXIKICAgICAgICAgICAgIGtlcm5lbCB2ZXJzaW9uICgyLjAueHgsIDIuMS54eCwgMi4yLnh4
LCAyLjMueHgpCgkgICAgCgkgICAgICAgICAgICAgCgkgICAgIAoJICAgICAK

--------------Boundary-00=_HWXHTST8WHJXCZEEN6DC--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/