Needed for things like http://sourceforge.net/projects/opennhrp/ Patch is accepted upstream.
Created attachment 134212 [details, diff] ipgre_nbma-2.6.22.patch Would be nice to get this backport into genpatches.
So have you tested this patch with a 2.6.22 kernel yourself? Can you confirm it works? If so, we can put this into genpatches.
Yes I have tested. It applies, kernel compiles and it does what it is supposed to do. To reproduce, create an gre tunnel in NBMA mode (omit the "remote" ip addr), ping the tunnel ip from a remote machine and run tshark on recieving computer. Look for the link layer source address (under Linux cooked capture). On an unpatched kernel: Linux cooked capture Packet type: Unicast to us (0) Link-layer address type: 778 Link-layer address length: 0 Source: <MISSING> Protocol: IP (0x0800) Note that the Source is reported as <MISSING> with a patched kernel: Linux cooked capture Packet type: Sent by us (4) Link-layer address type: 778 Link-layer address length: 4 Source: C0A841EA Protocol: IP (0x0800) Source is C0 a8 41 ea and the public ip (NMBA) address for the tunnel happens to be 192.168.65.234. (tcpdump will not display the linklayer source address but running strace will show that rcvfrom actually gets the NMBA addess: recvfrom(3, "E\0\0TR\27\0\0@\1\1\17\nA\t\1\nA\n\1\0\0,01<\2\37\312@"..., 80, MSG_TRUNC, {sa_family=AF_PACKET, proto=0x800, if7, pkttype=PACKET_OUTGOING, addr(4)={778, c0a841ea}, [16]) = 84) So yes, it works! Patch applies on a 2.6.23 kernel as well (and kerne compiles) but i havent set up the gre tunnel on 2.6.23. Author of patch (Timo) claims it works on 2.6.23. Do you want me to test it on 2.6.23 too?
Thanks for testing the patch with 2.6.22. Testing with 2.6.23 is not necessary, we'll wait until the patch hits Linus' tree and then we'll backport it to genpatches.
(In reply to comment #4) > we'll wait until the patch hits Linus' tree and then we'll backport it to > genpatches. It is in Linus' tree http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a5f44d7a048c97b8bae8ce464c97b8fad61ff99
The patch has been committed to genpatches. We'll keep this bug open until the next version of gentoo-sources has been released.
Please note that genpatches-2.6.23-2 has been released with this patch included, gentoo-sources-2.6.23-r1 is using it.
also fixed in gentoo-sources-2.6.22-r10