patch-2.2.0-pre8 linux/net/ipx/af_ipx.c
Next file: linux/net/socket.c
Previous file: linux/net/ipv6/ndisc.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Sun Jan 17 18:25:48 1999
- Orig file:
v2.2.0-pre7/linux/net/ipx/af_ipx.c
- Orig date:
Thu Jan 7 15:11:42 1999
diff -u --recursive --new-file v2.2.0-pre7/linux/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
@@ -1973,8 +1973,10 @@
uaddr.sipx_network = 0;
#ifdef CONFIG_IPX_INTERN
- memcpy(uaddr.sipx_node, sk->protinfo.af_ipx.intrfc->if_node,
- IPX_NODE_LEN);
+ if(sk->protinfo.af_ipx.intrfc)
+ memcpy(uaddr.sipx_node, sk->protinfo.af_ipx.intrfc->if_node,IPX_NODE_LEN);
+ else
+ return -ENETDOWN; /* Someone zonked the iface */
#endif /* CONFIG_IPX_INTERN */
ret = ipx_bind(sock, (struct sockaddr *)&uaddr,
@@ -2185,8 +2187,10 @@
uaddr.sipx_network = 0;
#ifdef CONFIG_IPX_INTERN
- memcpy(uaddr.sipx_node, sk->protinfo.af_ipx.intrfc->if_node,
- IPX_NODE_LEN);
+ if(sk->protinfo.af_ipx.intrfc)
+ memcpy(uaddr.sipx_node, sk->protinfo.af_ipx.intrfc->if_node,IPX_NODE_LEN);
+ else
+ return -ENETDOWN; /* Someone zonked the iface */
#endif /* CONFIG_IPX_INTERN */
ret = ipx_bind(sock, (struct sockaddr *)&uaddr,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov