patch-2.1.79 linux/net/ipv4/ipmr.c

Next file: linux/net/ipv4/raw.c
Previous file: linux/net/ipv4/ipconfig.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
@@ -9,7 +9,7 @@
  *	as published by the Free Software Foundation; either version
  *	2 of the License, or (at your option) any later version.
  *
- *	Version: $Id: ipmr.c,v 1.28 1997/10/30 00:43:16 davem Exp $
+ *	Version: $Id: ipmr.c,v 1.29 1997/12/13 21:52:55 kuznet Exp $
  *
  *	Fixes:
  *	Michael Chastain	:	Incorrect size of copying.
@@ -176,6 +176,7 @@
 		kfree(dev);
 		return NULL;
 	}
+	dev->iflink = 0;
 
 	if ((in_dev = inetdev_init(dev)) == NULL)
 		goto failure;
@@ -924,7 +925,7 @@
 			}
 			return -EADDRNOTAVAIL;
 		default:
-			return -EINVAL;
+			return -ENOIOCTLCMD;
 	}
 }
 
@@ -1095,7 +1096,6 @@
 	 * not mrouter) cannot join to more than one interface - it will
 	 * result in receiving multiple packets.
 	 */
-	ip_ll_header(skb2);
 	skb2->dst->output(skb2);
 }
 
@@ -1282,6 +1282,7 @@
 		kfree_skb(skb, FREE_READ);
 		return -EINVAL;
 	}
+	skb->mac.raw = skb->nh.raw;
 	skb_pull(skb, (u8*)encap - skb->data);
 	skb->nh.iph = (struct iphdr *)skb->data;
 	skb->dev = reg_dev;
@@ -1321,6 +1322,7 @@
 		kfree_skb(skb, FREE_READ);
 		return -EINVAL;
 	}
+	skb->mac.raw = skb->nh.raw;
 	skb_pull(skb, (u8*)encap - skb->data);
 	skb->nh.iph = (struct iphdr *)skb->data;
 	skb->dev = reg_dev;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov