patch-2.1.91 linux/net/ipv6/datagram.c
Next file: linux/net/ipv6/icmp.c
Previous file: linux/net/ipv6/af_inet6.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Mon Mar 23 16:48:25 1998
- Orig file:
v2.1.90/linux/net/ipv6/datagram.c
- Orig date:
Mon Jan 12 15:28:28 1998
diff -u --recursive --new-file v2.1.90/linux/net/ipv6/datagram.c linux/net/ipv6/datagram.c
@@ -5,7 +5,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
- * $Id: datagram.c,v 1.13 1997/12/13 21:53:09 kuznet Exp $
+ * $Id: datagram.c,v 1.14 1998/03/20 09:12:15 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -55,7 +55,7 @@
return 0;
}
-int datagram_send_ctl(struct msghdr *msg, struct device **src_dev,
+int datagram_send_ctl(struct msghdr *msg, int *oif,
struct in6_addr **src_addr, struct ipv6_options *opt,
int *hlimit)
{
@@ -81,15 +81,15 @@
src_info = (struct in6_pktinfo *)CMSG_DATA(cmsg);
if (src_info->ipi6_ifindex) {
- int index = src_info->ipi6_ifindex;
-
- *src_dev = dev_get_by_index(index);
+ if (*oif && src_info->ipi6_ifindex != *oif)
+ return -EINVAL;
+ *oif = src_info->ipi6_ifindex;
}
-
+
if (!ipv6_addr_any(&src_info->ipi6_addr)) {
struct inet6_ifaddr *ifp;
- ifp = ipv6_chk_addr(&src_info->ipi6_addr, *src_dev, 0);
+ ifp = ipv6_chk_addr(&src_info->ipi6_addr, NULL, 0);
if (ifp == NULL) {
err = -EINVAL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov