Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 1999 14:47:22 -0400 (EDT)
From:      Larry Lile <lile@stdio.com>
To:        ip@mcc.ac.uk
Cc:        current@FreeBSD.ORG
Subject:   Re: Patch to fix [Re: Bad, reliable crash: Julian's "oltr" stuff & ARP]
Message-ID:  <Pine.BSF.4.05.9904141445510.3818-200000@heathers.stdio.com>
In-Reply-To: <Pine.BSF.4.05.9904141308310.3818-200000@heathers.stdio.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-2124461379-924115642=:3818
Content-Type: TEXT/PLAIN; charset=US-ASCII


Okay, that one is just a little too strong.  It won't allow
a FreeBSD token-ring station to arp-reply to an ethernet station
on the other side of a "broken" translational bridge.  This one
will.

Larry Lile
lile@stdio.com

On Wed, 14 Apr 1999, Larry Lile wrote:

> 
> The problem Mr. Pallfreeman was seeing are related to how I was
> building the arp-reply based on the sources arp_hrd type.  I never
> expected to see a token-ring arp arrive over an ethernet interface.
> Therefore the arp code was trying to check for and collect the 
> source route that the arp took on its way.  I have modified the
> arp code to go looking for the source-route information only if
> the arp comes from a token-ring station and is received on a 
> token-ring interface.  The arp-reply packet generated is based
> on the type of interface the arp was received on.  I think
> the bridge should have changed the arp_hrd type when it forwarded
> the packet, while it was changing everything else, but I think
> that falls into a religous debate.  Thanks to Mr. Pallfreeman
> for helping me debug this and testing my patch.
> 
> What this means is: you should be able to arp in both directions
> over a token-ring<->ethernet (translational|non-translational) bridge.
> 
> The inherent "brokenness" of translational bridging is left as an
> exercise for the reader :)
> 
> Here's the patch, if someone would be kind enough to commit it.  It
> seems to have resolved Mr. Pallfreeman's issue and doesn't seem to
> break anything else.
> 
> Larry Lile
> lile@stdio.com
> 

--0-2124461379-924115642=:3818
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="if_ether.c.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.4.05.9904141447220.3818@heathers.stdio.com>
Content-Description: ARP Patch revisited
Content-Disposition: attachment; filename="if_ether.c.patch"

KioqIGlmX2V0aGVyLmMub3JpZwlNb24gTWFyICA4IDEzOjIyOjQxIDE5OTkN
Ci0tLSBpZl9ldGhlci5jCVdlZCBBcHIgMTQgMTQ6NDM6NDEgMTk5OQ0KKioq
KioqKioqKioqKioqDQoqKiogNTU5LDU2NiAqKioqDQogIAkJKHZvaWQpbWVt
Y3B5KExMQUREUihzZGwpLCBlYS0+YXJwX3NoYSwgc2l6ZW9mKGVhLT5hcnBf
c2hhKSk7DQogIAkJc2RsLT5zZGxfYWxlbiA9IHNpemVvZihlYS0+YXJwX3No
YSk7DQogICAgICAgICAgICAgICAgICBzZGwtPnNkbF9yY2YgPSBOVUxMOw0K
ISAJCS8qIFNhdmUgc291cmNlIHJvdXRpbmcgaW5mb3JtYXRpb24gZm9yIFRv
a2VuLXJpbmcgaW50ZXJmYWNlcywgaWYgYXZhaWxhYmxlICovDQohIAkJaWYg
KGVhLT5hcnBfaHJkID09IGh0b25zKEFSUEhSRF9JRUVFODAyKSkgew0KICAJ
CQl0aCA9IChzdHJ1Y3QgaXNvODgwMjVfaGVhZGVyICopbS0+bV9wa3RoZHIu
aGVhZGVyOw0KICAgICAgICAgICAgICAgICAgCWlmICgodGgtPmlzbzg4MDI1
X3Nob3N0WzBdICYgMHg4MCkgJiYgKCgobnRvaHModGgtPnJjZikgJiAweDFm
MDApID4+IDgpID4gMikpIHsNCiAgCQkJCXNkbC0+c2RsX3JjZiA9IG50b2hz
KHRoLT5yY2YpICYgMHgwMDgwID8gDQotLS0gNTU5LDU2OCAtLS0tDQogIAkJ
KHZvaWQpbWVtY3B5KExMQUREUihzZGwpLCBlYS0+YXJwX3NoYSwgc2l6ZW9m
KGVhLT5hcnBfc2hhKSk7DQogIAkJc2RsLT5zZGxfYWxlbiA9IHNpemVvZihl
YS0+YXJwX3NoYSk7DQogICAgICAgICAg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3QpICogMildID0gMHgxMDsNCiAgCQlzYS5zYV9kYXRhWyhzaXplb2Yo
dGgtPmlzbzg4MDI1X2Rob3N0KSAqIDIpICsgMV0gPSAweDQwOw0KICAJCWJy
ZWFrOw0KISAJY2FzZSBBUlBIUkRfRVRIRVI6DQogIAkJZWggPSAoc3RydWN0
IGV0aGVyX2hlYWRlciAqKXNhLnNhX2RhdGE7DQogIAkJKHZvaWQpbWVtY3B5
KGVoLT5ldGhlcl9kaG9zdCwgZWEtPmFycF90aGEsIHNpemVvZihlaC0+ZXRo
ZXJfZGhvc3QpKTsNCiAgCQllaC0+ZXRoZXJfdHlwZSA9IGh0b25zKEVUSEVS
VFlQRV9BUlApOw0KLS0tIDY2Niw2NzIgLS0tLQ0KICAJCXNhLnNhX2RhdGFb
KHNpemVvZih0aC0+aXNvODgwMjVfZGhvc3QpICogMildID0gMHgxMDsNCiAg
CQlzYS5zYV9kYXRhWyhzaXplb2YodGgtPmlzbzg4MDI1X2Rob3N0KSAqIDIp
ICsgMV0gPSAweDQwOw0KICAJCWJyZWFrOw0KISAJY2FzZSBJRlRfRVRIRVI6
DQogIAkJZWggPSAoc3RydWN0IGV0aGVyX2hlYWRlciAqKXNhLnNhX2RhdGE7
DQogIAkJKHZvaWQpbWVtY3B5KGVoLT5ldGhlcl9kaG9zdCwgZWEtPmFycF90
aGEsIHNpemVvZihlaC0+ZXRoZXJfZGhvc3QpKTsNCiAgCQllaC0+ZXRoZXJf
dHlwZSA9IGh0b25zKEVUSEVSVFlQRV9BUlApOw0K
--0-2124461379-924115642=:3818--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9904141445510.3818-200000>