Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net For these interfaces, the implementation of SIOCSIFD...



details:   https://anonhg.NetBSD.org/src/rev/087b6184af90
branches:  trunk
changeset: 770671:087b6184af90
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Oct 28 22:08:14 2011 +0000

description:
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.

diffstat:

 sys/net/if_ppp.c      |  20 ++------------------
 sys/net/if_spppsubr.c |   5 ++---
 sys/net/if_srt.c      |   6 ++----
 sys/net/if_tun.c      |   8 ++------
 4 files changed, 8 insertions(+), 31 deletions(-)

diffs (126 lines):

diff -r 6dd3bf11e736 -r 087b6184af90 sys/net/if_ppp.c
--- a/sys/net/if_ppp.c  Fri Oct 28 21:51:06 2011 +0000
+++ b/sys/net/if_ppp.c  Fri Oct 28 22:08:14 2011 +0000
@@ -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"
 
@@ -767,22 +767,6 @@
        }
        break;
 
-    case SIOCSIFDSTADDR:
-       switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
-       case AF_INET:
-           break;
-#endif
-#ifdef INET6
-       case AF_INET6:
-           break;
-#endif
-       default:
-           error = EAFNOSUPPORT;
-           break;
-       }
-       break;
-
     case SIOCADDMULTI:
     case SIOCDELMULTI:
        if (ifr == NULL) {
diff -r 6dd3bf11e736 -r 087b6184af90 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Fri Oct 28 21:51:06 2011 +0000
+++ b/sys/net/if_spppsubr.c     Fri Oct 28 22:08:14 2011 +0000
@@ -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 @@
 
        s = splnet();
        switch (cmd) {
-       case SIOCSIFDSTADDR:
        case SIOCINITIFADDR:
                break;
 
diff -r 6dd3bf11e736 -r 087b6184af90 sys/net/if_srt.c
--- a/sys/net/if_srt.c  Fri Oct 28 21:51:06 2011 +0000
+++ b/sys/net/if_srt.c  Fri Oct 28 22:08:14 2011 +0000
@@ -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 @@
        s = splnet();
        switch (cmd) {
        case SIOCINITIFADDR:
-       case SIOCSIFDSTADDR:
                ifa = (void *) data;
                switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
@@ -165,7 +164,6 @@
                        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)
diff -r 6dd3bf11e736 -r 087b6184af90 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Fri Oct 28 21:51:06 2011 +0000
+++ b/sys/net/if_tun.c  Fri Oct 28 22:08:14 2011 +0000
@@ -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@localhost>
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index