linux/net
Brian Haley befffe9016 [IPV6]: Fix IPV6_UNICAST_HOPS getsockopt().
> Relevant standard (RFC 3493) notes:
>
>    The IPV6_UNICAST_HOPS option may be used with getsockopt() to
>    determine the hop limit value that the system will use for subsequent
>    unicast packets sent via that socket.
>
> I don't reckon -1 could be the hop limit value.

-1 means un-initialized.

> IMHO, the value from
> case 1 (if socket is connected to some destination), otherwise case 2
> (if bound to a scope interface) or ultimately the default hop limit
> ought to be returned instead, as it will be most often correct, while
> the current behavior is always wrong, unless setsockopt() has been used
> first. I don't if some people may think doing a route lookup in
> getsockopt might be overly expensive, but at least the two other cases
> should be ok, particularly the last one.

The following patch seems to work for me, but this code has behaved this
way for a while, so don't know if it will break any existing apps.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-13 16:48:25 -08:00
..
802 [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
8021q [PATCH] Finish annotations of struct vlan_ethhdr 2006-10-10 16:15:34 -07:00
appletalk [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
atm [PATCH] struct path: convert atm 2006-12-08 08:28:44 -08:00
ax25 [HAMRADIO]: Fix baycom_epp.c compile failure. 2006-12-11 14:35:01 -08:00
bluetooth [PATCH] hci endianness annotations 2006-12-13 09:05:52 -08:00
bridge Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-12-07 09:05:15 -08:00
core [PATCH] netpoll: fix netpoll lockup 2006-12-12 08:37:51 -08:00
dccp [DCCP] ccid3: return value in ccid3_hc_rx_calc_first_li 2006-12-13 16:48:24 -08:00
decnet [PATCH] sysctl: remove unused "context" param 2006-12-10 09:55:41 -08:00
econet [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
ethernet [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
ieee80211 [PATCH] workstruct: fix ieee80211-softmac compile problem 2006-12-10 09:55:39 -08:00
ipv4 [NETFILTER]: {ip,ip6,arp}_tables: fix exponential worst-case search for loops 2006-12-13 16:48:23 -08:00
ipv6 [IPV6]: Fix IPV6_UNICAST_HOPS getsockopt(). 2006-12-13 16:48:25 -08:00
ipx [IPX]: Annotate and fix IPX checksum 2006-11-05 14:11:25 -08:00
irda [PATCH] tty: switch to ktermios and new framework 2006-12-08 08:28:56 -08:00
key audit: Add auditing to ipsec 2006-12-06 20:14:22 -08:00
lapb [LAPB]: Fix windowsize check 2006-08-05 21:15:58 -07:00
llc [LLC]: anotations 2006-12-02 21:21:23 -08:00
netfilter [NETFILTER]: x_tables: add missing try to load conntrack from match/targets 2006-12-13 16:48:21 -08:00
netlabel NetLabel: convert to an extensibile/sparse category bitmap 2006-12-02 21:31:36 -08:00
netlink [PATCH] struct path: convert netlink 2006-12-08 08:28:48 -08:00
netrom [NETROM]: Use kmemdup 2006-12-02 21:24:02 -08:00
packet [NET]: Memory barrier cleanups 2006-12-07 00:11:33 -08:00
rose [ROSE] rose_add_loopback_node: propagate -E 2006-12-02 22:17:48 -08:00
rxrpc [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
sched [NET_SCHED] sch_htb: turn intermediate classes into leaves 2006-12-08 17:19:32 -08:00
sctp [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
sunrpc [PATCH] knfsd: Don't ignore kstrdup failure in rpc caches 2006-12-13 09:05:54 -08:00
tipc [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
unix [PATCH] struct path: convert unix 2006-12-08 08:28:50 -08:00
wanrouter [WANROUTER]: Kill kmalloc debugging code. 2006-12-07 00:18:22 -08:00
x25
xfrm Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-12-07 09:05:15 -08:00
compat.c [NET]: File descriptor loss while receiving SCM_RIGHTS 2006-10-11 23:59:48 -07:00
Kconfig [NETFILTER]: remove the reference to ipchains from Kconfig 2006-12-02 21:31:35 -08:00
Makefile [NetLabel]: core NetLabel subsystem 2006-09-22 14:53:34 -07:00
nonet.c
socket.c [PATCH] struct path: convert net 2006-12-08 08:28:48 -08:00
sysctl_net.c
TUNABLE