Subject: Re: IPv4 multicast set/getsockopt, specifying interface index
To: Hiroto Shibuya <shibuya@xedia.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 01/13/2001 13:21:38
>>	the following patch uses 0.0.0.0/8 as 24bit interface index value.
>>	on getsockopt(IP_MULTICAST_IF) it will return the value the user has
>>	set.  does it look right, or messy?
>> 	(Dave Thaler suggested this based on RFC1724 section 3.3 - RIPv2
>> 	MIB, and he said there's other system doing/will be doing
>>       this)
>I was not aware of that part of RFC1724, but within our router, in
>private MIBs and internal implementation, next-hop value has been used
>as ifIndex if it falls in 0.0.0.0/8.  I thought it was ugly hack but
>now I feel somewhat better to know that it is a "standard" hack.

	in normal routing table?  you have ifp to do that...
	you can put an IPv6 default route to gif0 interface (not to address)
	by the following operations.  (the reason why we need two operation
	is due to some restrictions in sys/net/{rtsock,route}.c - i'll
	correct it based on post-4.4BSD change)
	# route add -inet6 default ::1
	# route change -inet6 default -ifp gif0

itojun