ipip.c & ip_gre.c (Add Tunnel return)
Subsystems (2)
PATCH 1/1 ipip.c & ip_gre.c (Add Tunnel return)
I think the tunnel drivers should return the name of the device the tunnel add created. Currently the tunnel_lookup functions copy the name into the stack var in the ioctl function but the ioctl copies the parm from the tunnel device.
net/ipv4/ip_gre.c +1 -1
@@ -284,7 +284,7 @@ }if (i==100 ) goto failed; -memcpy (parms->name, dev->name,IFNAMSIZ ); +memcpy (nt->parms.name, dev->name,IFNAMSIZ ); }if (register_netdevice (dev) <0 ) goto failed;
net/ipv4/ipip.c +1 -1
@@ -255,7 +255,7 @@ }if (i==100 ) goto failed; -memcpy (parms->name, dev->name,IFNAMSIZ ); +memcpy (nt->parms.name, dev->name,IFNAMSIZ ); }if (register_netdevice (dev) <0 ) goto failed;
From: andrew may <[email protected]>
Date: Tue, 25 Sep 2001 15:26:28 -0700
I think the tunnel drivers should return the name of the device the tunnel add created. Currently the tunnel_lookup functions copy the name into the stack var in the ioctl function but the ioctl copies the parm from the tunnel device.
Hmmm, net/ipv6/sit.c already has the version you propose. :-))) Which one is correct?
Alexey, what do you think?
Franks a lot,
David S. Miller
[email protected]
From: "David S. Miller" <[email protected]>
Date: Tue, 25 Sep 2001 15:31:19 -0700 (PDT)
[ replying to self...]
Hmmm, net/ipv6/sit.c already has the version you propose. :-))) Which one is correct?
Alexey, what do you think?
Nevermind, it is clear that Andrew's patch is correct. I've applied it, thanks.
Franks a lot,
David S. Miller
[email protected]