Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196904 - [PATCH] Support for low-level protocol implementations over NBMA GRE tunnels
Summary: [PATCH] Support for low-level protocol implementations over NBMA GRE tunnels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://marc.info/?l=linux-netdev&m=11...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-10-24 10:03 UTC by Natanael Copa
Modified: 2007-11-07 13:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ipgre_nbma-2.6.22.patch (ipgre_nbma-2.6.22.patch,1.36 KB, patch)
2007-10-24 10:04 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2007-10-24 10:03:42 UTC
Needed for things like
http://sourceforge.net/projects/opennhrp/

Patch is accepted upstream.
Comment 1 Natanael Copa 2007-10-24 10:04:38 UTC
Created attachment 134212 [details, diff]
ipgre_nbma-2.6.22.patch

Would be nice to get this backport into genpatches.
Comment 2 Maarten Bressers (RETIRED) gentoo-dev 2007-10-24 21:10:19 UTC
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.
Comment 3 Natanael Copa 2007-10-25 07:45:37 UTC
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?

Comment 4 Maarten Bressers (RETIRED) gentoo-dev 2007-10-25 21:25:35 UTC
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.
Comment 5 Natanael Copa 2007-10-26 10:59:18 UTC
(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

Comment 6 Maarten Bressers (RETIRED) gentoo-dev 2007-10-30 23:17:39 UTC
The patch has been committed to genpatches. We'll keep this bug open until the next version of gentoo-sources has been released.
Comment 7 Mike Pagano gentoo-dev 2007-11-02 17:31:54 UTC
Please note that genpatches-2.6.23-2 has been released with this patch included, gentoo-sources-2.6.23-r1 is using it.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2007-11-07 13:17:48 UTC
also fixed in gentoo-sources-2.6.22-r10