| Summary: | arping needs alternate setting for some routers | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Gabriel Devenyi <ace> |
| Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | beolach+gb |
| Priority: | High | ||
| Version: | 2007.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
arping.sh patch for source address
arping.patch arping.patch |
||
|
Description
Gabriel Devenyi
2007-06-04 18:29:21 UTC
I think that this is addressed in baselayout-2.0.0_alpha3, but in a different way. Re-open if you disagree. Baselayout 2 doesn't have an option to spoof the source IP address of the arping, hence it does not fix this bug. Created attachment 131746 [details, diff] arping.sh patch for source address Attached is a patch against arping.sh from baselayout-1.12.10-r4 that basically does what Gabriel Devenyi described. I haven't even looked at baselayout-2.0.0*, so I dunno what the current status is with them. @Roy Marples: what's the "different way" baselayout-2.0.0_alpha3 addresses the issue? Re: Gabriel Devenyi > Ideally this would work by grabbing the static IP from > config_<gateway_address> = ...., but as this can be one of many things, its > probably needs a separate config such as > arping_spoofaddress = <source_address> I'm not skilled enough to figure out how to get just the IP from config_<gateway_address>, so my patch uses arping_source_<gateway_address> (or a global arping_source). > This of course would also require arping2, as I don't think arping can do this > kind of thing. arping from iputils-20070202 has a similar option, -s, but it doesn't seem to work for me, gives a "bind: Cannot assign requested address" error. So one thing my patch changes is prefering arping2 over arping if both are installed. gateways_eth0="1.2.3,4,aa:bb:cc:dd:ee:ff,5.6.7.8" gateways_eth0="1.2.3,4,,5.6.7.8" Will both spoof the ip of 5.6.7.8 if arping2 is installed. Patch added to our svn repo, will be in baselayout-2.0.0_rc6 Thanks Thanks for implementing this, but it doesn't quite work yet. The "-O" option explicitly tells arping2 to send from 0.0.0.0, and that seems to be inserted twice into the call to arping2, overriding the "-S" command. If we're going to spoof the source, the -O option needs to be dropped from the call. Created attachment 134894 [details, diff]
arping.patch
Let me know if this patch works
Patch works, arping2 now correctly spoofs the address, interesting that there is still one "-O" in the call, but its before the -S, this means that either two -O's overrides the -S, or the last used parameter is used. Either way, it works now, thanks. On a sidenote, the configuration config_eth0="dhcp" fallback_eth0="arping" fails out after the dhcp, rather than trying the arping... Created attachment 134896 [details, diff]
arping.patch
Don't use -0 when spoofing
(In reply to comment #7) > On a sidenote, the configuration > config_eth0="dhcp" > fallback_eth0="arping" > > fails out after the dhcp, rather than trying the arping... File a new bug for that please. See bug #197788 New arping.patch also works fine, and calls arping2 with no -O, which should be more robust. Thanks again. |