For these interfaces, the implementation of SIOCSIFDSTADDR is identical
to SIOCINITIFADDR, and SIOCSIFDSTADDR callers always fall back to SIOCINITIFADDR, so just get rid of the SIOCSIFDSTADDR case.
This commit is contained in:
parent
b94db0ddf1
commit
53c8737e53
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ppp.c,v 1.135 2011/10/28 20:13:32 dyoung Exp $ */
|
||||
/* $NetBSD: if_ppp.c,v 1.136 2011/10/28 22:08:14 dyoung Exp $ */
|
||||
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
|
||||
|
||||
/*
|
||||
@ -102,7 +102,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.135 2011/10/28 20:13:32 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.136 2011/10/28 22:08:14 dyoung Exp $");
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
@ -757,22 +757,6 @@ pppsioctl(struct ifnet *ifp, u_long cmd, void *data)
|
||||
case AF_INET:
|
||||
break;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
error = EAFNOSUPPORT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIOCSIFDSTADDR:
|
||||
switch (ifa->ifa_addr->sa_family) {
|
||||
#ifdef INET
|
||||
case AF_INET:
|
||||
break;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_spppsubr.c,v 1.122 2011/09/05 12:19:09 rjs Exp $ */
|
||||
/* $NetBSD: if_spppsubr.c,v 1.123 2011/10/28 22:08:14 dyoung Exp $ */
|
||||
|
||||
/*
|
||||
* Synchronous PPP/Cisco link level subroutines.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.122 2011/09/05 12:19:09 rjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.123 2011/10/28 22:08:14 dyoung Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_inet.h"
|
||||
@ -1045,7 +1045,6 @@ sppp_ioctl(struct ifnet *ifp, u_long cmd, void *data)
|
||||
|
||||
s = splnet();
|
||||
switch (cmd) {
|
||||
case SIOCSIFDSTADDR:
|
||||
case SIOCINITIFADDR:
|
||||
break;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* $NetBSD: if_srt.c,v 1.16 2011/07/17 20:54:52 joerg Exp $ */
|
||||
/* $NetBSD: if_srt.c,v 1.17 2011/10/28 22:08:14 dyoung Exp $ */
|
||||
/* This file is in the public domain. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_srt.c,v 1.16 2011/07/17 20:54:52 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_srt.c,v 1.17 2011/10/28 22:08:14 dyoung Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -150,7 +150,6 @@ srt_if_ioctl(struct ifnet *ifp, u_long cmd, void *data)
|
||||
s = splnet();
|
||||
switch (cmd) {
|
||||
case SIOCINITIFADDR:
|
||||
case SIOCSIFDSTADDR:
|
||||
ifa = (void *) data;
|
||||
switch (ifa->ifa_addr->sa_family) {
|
||||
#ifdef INET
|
||||
@ -165,7 +164,6 @@ srt_if_ioctl(struct ifnet *ifp, u_long cmd, void *data)
|
||||
err = EAFNOSUPPORT;
|
||||
break;
|
||||
}
|
||||
/* XXX do we need to do more here for either of these? */
|
||||
break;
|
||||
default:
|
||||
if ((err = ifioctl_common(ifp, cmd, data)) == ENETRESET)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_tun.c,v 1.113 2010/04/05 07:22:24 joerg Exp $ */
|
||||
/* $NetBSD: if_tun.c,v 1.114 2011/10/28 22:08:14 dyoung Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
|
||||
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.113 2010/04/05 07:22:24 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.114 2011/10/28 22:08:14 dyoung Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -442,10 +442,6 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, void *data)
|
||||
tuninit(tp);
|
||||
TUNDEBUG("%s: address set\n", ifp->if_xname);
|
||||
break;
|
||||
case SIOCSIFDSTADDR:
|
||||
tuninit(tp);
|
||||
TUNDEBUG("%s: destination address set\n", ifp->if_xname);
|
||||
break;
|
||||
case SIOCSIFBRDADDR:
|
||||
TUNDEBUG("%s: broadcast address set\n", ifp->if_xname);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user