patch-2.1.21 linux/net/ipv6/ipv6_output.c
Next file: linux/net/ipv6/ipv6_sockglue.c
Previous file: linux/net/ipv6/icmp.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Tue Jan 14 08:16:49 1997
- Orig file:
v2.1.20/linux/net/ipv6/ipv6_output.c
- Orig date:
Thu Dec 12 19:37:30 1996
diff -u --recursive --new-file v2.1.20/linux/net/ipv6/ipv6_output.c linux/net/ipv6/ipv6_output.c
@@ -397,11 +397,10 @@
int ipv6_build_xmit(struct sock *sk, inet_getfrag_t getfrag, const void *data,
struct in6_addr *dest, unsigned short int length,
struct in6_addr *saddr, struct device *dev,
- struct ipv6_options *opt, int proto,
+ struct ipv6_options *opt, int proto, int hlimit,
int noblock)
{
rt6_output_method_t output_method = default_output_method;
- int hlimit;
struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
struct dest_entry *dc = NULL;
struct in6_addr *daddr = dest;
@@ -420,17 +419,21 @@
}
addr_type = ipv6_addr_type(daddr);
- if (addr_type & IPV6_ADDR_MULTICAST)
+
+ if (hlimit < 1)
{
- hlimit = np->mcast_hops;
- if (dev == NULL)
+ if (addr_type & IPV6_ADDR_MULTICAST)
{
- dev = np->mc_if;
+ hlimit = np->mcast_hops;
+ if (dev == NULL)
+ {
+ dev = np->mc_if;
+ }
}
+ else
+ hlimit = np->hop_limit;
}
- else
- hlimit = np->hop_limit;
-
+
if (addr_type & (IPV6_ADDR_LINKLOCAL | IPV6_ADDR_SITELOCAL |
IPV6_ADDR_MULTICAST))
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov