On Tue, Oct 01, 2013 at 10:25:45AM +0200, Martin Pieuchot wrote: > On 30/09/13(Mon) 14:17, Loganaden Velvindron wrote: > > On Mon, Sep 30, 2013 at 10:51:47PM +0200, Alexander Bluhm wrote: > > > On Wed, Sep 18, 2013 at 12:01:10AM -0700, Loganaden Velvindron wrote: > > > > Index: in6.c > > > > =================================================================== > > > > RCS file: /cvs/src/sys/netinet6/in6.c,v > > > > retrieving revision 1.118 > > > > diff -u -p -r1.118 in6.c > > > > --- in6.c 26 Aug 2013 07:15:58 -0000 1.118 > > > > +++ in6.c 18 Sep 2013 06:54:13 -0000 > > > > @@ -426,8 +426,11 @@ in6_control(struct socket *so, u_long cm > > > > sa6 = &ifr->ifr_addr; > > > > break; > > > > case SIOCSIFADDR: > > > > + case SIOCSIFDSTADDR: > > > > + case SIOCSIFBRDADDR: > > > > + case SIOCSIFNETMASK: > > > > /* > > > > - * Do not pass this ioctl to driver handler since it is > > > > not > > > > + * Do not pass those ioctl to driver handler since they > > > > are not > > > > * properly setup. Instead just error out. > > > > */ > > > > return (EOPNOTSUPP); > > > > > > This diff uses spaces instead of tabs. Please use tabs to make > > > diffs apply cleanly. > > > > > > The errno EAFNOSUPPORT "Address family not supported by protocol > > > family" is more specific for that error, at least if_ppp and if_sl > > > use that. > > > > Fixed style issues: > > > > Index: netinet6/in6.c > > =================================================================== > > RCS file: /cvs/src/sys/netinet6/in6.c,v > > retrieving revision 1.118 > > diff -u -p -r1.118 in6.c > > --- netinet6/in6.c 26 Aug 2013 07:15:58 -0000 1.118 > > +++ netinet6/in6.c 30 Sep 2013 21:14:43 -0000 > > @@ -426,8 +426,11 @@ in6_control(struct socket *so, u_long cm > > sa6 = &ifr->ifr_addr; > > break; > > case SIOCSIFADDR: > > + case SIOCSIFDSTADDR: > > + case SIOCSIFBRDADDR: > > + case SIOCSIFNETMASK: > > /* > > - * Do not pass this ioctl to driver handler since it is not > > + * Do not pass those ioctl to driver handler since they are not > > * properly setup. Instead just error out. > > */ > > return (EOPNOTSUPP); > > > > > > > > anyway, code is correct, OK bluhm@ > > Committed, thanks. > > > Can you please elaborate a bit concerning the cleanup for if_tun.c that > > mpi@ mentioned ? > > Well what could be done is to remove the SIOCSIFBRDADDR case because it is > never reached, diff below. > > Index: net/if_tun.c > =================================================================== > RCS file: /home/ncvs/src/sys/net/if_tun.c,v > retrieving revision 1.115 > diff -u -p -r1.115 if_tun.c > --- net/if_tun.c 25 May 2013 10:05:52 -0000 1.115 > +++ net/if_tun.c 10 Sep 2013 12:54:41 -0000 > @@ -493,10 +493,6 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, > tuninit(tp); > TUNDEBUG(("%s: destination address set\n", ifp->if_xname)); > break; > - case SIOCSIFBRDADDR: > - tuninit(tp); > - TUNDEBUG(("%s: broadcast address set\n", ifp->if_xname)); > - break; > case SIOCSIFMTU: > if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > TUNMRU) > error = EINVAL; >
OK. -- :wq Claudio