patch-1.3.60 linux/net/appletalk/ddp.c

Next file: linux/net/ax25/af_ax25.c
Previous file: linux/net/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.59/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
@@ -17,6 +17,7 @@
  *		Alan Cox		:	Moved at. to protinfo in
  *						socket.
  *		Alan Cox		:	Added firewall hooks.
+ *		Alan Cox		:	Supports new ARPHRD_LOOPBACK
  *
  *		This program is free software; you can redistribute it and/or
  *		modify it under the terms of the GNU General Public License
@@ -714,7 +715,7 @@
 				return -EPERM;
 			if(sa->sat_family!=AF_APPLETALK)
 				return -EINVAL;
-			if(dev->type!=ARPHRD_ETHER)
+			if(dev->type!=ARPHRD_ETHER&&dev->type!=ARPHRD_LOOPBACK)
 				return -EPROTONOSUPPORT;
 			nr=(struct netrange *)&sa->sat_zero[0];
 			if(nr->nr_phase!=2)
@@ -1032,6 +1033,7 @@
 		return err;
 	put_user(sizeof(int),optlen);
 	err=verify_area(VERIFY_WRITE,optval,sizeof(int));
+	if (err) return err;
 	put_user(val,optval);
 	return(0);
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this