NetBSD-Bugs archive

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

Re: bin/40455 (route can't change reject to blackhole)



The following reply was made to PR bin/40455; it has been noted by GNATS.

From: Mihai Chelaru <mihai.chelaru%NGNetworks.ro@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, 
reed%reedmedia.net@localhost
Subject: Re: bin/40455 (route can't change reject to blackhole)
Date: Tue, 11 May 2010 22:45:45 +0300

 This is a multi-part message in MIME format.
 --------------010209080508090403020908
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Probably you'll also find this diff useful.
 
 --------------010209080508090403020908
 Content-Type: text/plain;
  name="rej.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="rej.diff"
 
 Index: keywords.c
 ===================================================================
 RCS file: /cvsroot/src/sbin/route/keywords.c,v
 retrieving revision 1.6
 diff -u -p -r1.6 keywords.c
 --- keywords.c 6 Aug 2006 17:44:56 -0000       1.6
 +++ keywords.c 11 May 2010 19:43:05 -0000
 @@ -57,6 +57,8 @@ struct keytab keywords[] = {
        {"xns", K_XNS},
        {"xresolve", K_XRESOLVE},
        {"flushall", K_FLUSHALL},
 +      {"noblackhole", K_NOBLACKHOLE},
 +      {"noreject", K_NOREJECT},
        {0, 0}
  };
  
 Index: keywords.h
 ===================================================================
 RCS file: /cvsroot/src/sbin/route/keywords.h,v
 retrieving revision 1.9
 diff -u -p -r1.9 keywords.h
 --- keywords.h 6 Aug 2006 17:44:56 -0000       1.9
 +++ keywords.h 11 May 2010 19:43:05 -0000
 @@ -59,3 +59,5 @@ extern struct keytab {
  #define       K_FLUSHALL      49
  #define       K_NOCLONED      50
  #define       K_NOCLONING     51
 +#define       K_NOBLACKHOLE   52
 +#define       K_NOREJECT      53
 Index: route.8
 ===================================================================
 RCS file: /cvsroot/src/sbin/route/route.8,v
 retrieving revision 1.40
 diff -u -p -r1.40 route.8
 --- route.8    6 Aug 2006 23:38:13 -0000       1.40
 +++ route.8    11 May 2010 19:43:05 -0000
 @@ -267,19 +267,21 @@ when sending to destinations matched by 
  These flags may be set (or sometimes cleared)
  by indicating the following corresponding modifiers:
  .Bd -literal
 --cloning    RTF_CLONING    - generates a new route on use
 --nocloning ~RTF_CLONING    - stop generating new routes on use
 --cloned     RTF_CLONED     - cloned route generated by RTF_CLONING
 --nocloned  ~RTF_CLONED     - prevent removal with RTF_CLONING parent
 --xresolve   RTF_XRESOLVE   - emit mesg on use (for external lookup)
 --iface     ~RTF_GATEWAY    - destination is directly reachable
 --static     RTF_STATIC     - manually added route
 --nostatic  ~RTF_STATIC     - pretend route added by kernel or daemon
 --reject     RTF_REJECT     - emit an ICMP unreachable when matched
 --blackhole  RTF_BLACKHOLE  - silently discard pkts (during updates)
 --proto1     RTF_PROTO1     - set protocol specific routing flag #1
 --proto2     RTF_PROTO2     - set protocol specific routing flag #2
 --llinfo     RTF_LLINFO     - validly translates proto addr to link addr
 +-cloning      RTF_CLONING    - generates a new route on use
 +-nocloning   ~RTF_CLONING    - stop generating new routes on use
 +-cloned       RTF_CLONED     - cloned route generated by RTF_CLONING
 +-nocloned    ~RTF_CLONED     - prevent removal with RTF_CLONING parent
 +-xresolve     RTF_XRESOLVE   - emit mesg on use (for external lookup)
 +-iface       ~RTF_GATEWAY    - destination is directly reachable
 +-static       RTF_STATIC     - manually added route
 +-nostatic    ~RTF_STATIC     - pretend route added by kernel or daemon
 +-reject       RTF_REJECT     - emit an ICMP unreachable when matched
 +-noreject    ~RTF_REJECT     - clear reject flag
 +-blackhole    RTF_BLACKHOLE  - silently discard pkts (during updates)
 +-noblackhole ~RTF_BLACKHOLE  - clear blackhole flag
 +-proto1       RTF_PROTO1     - set protocol specific routing flag #1
 +-proto2       RTF_PROTO2     - set protocol specific routing flag #2
 +-llinfo       RTF_LLINFO     - validly translates proto addr to link addr
  .Ed
  .Pp
  The optional modifiers
 Index: route.c
 ===================================================================
 RCS file: /cvsroot/src/sbin/route/route.c,v
 retrieving revision 1.119
 diff -u -p -r1.119 route.c
 --- route.c    28 Dec 2008 20:12:31 -0000      1.119
 +++ route.c    11 May 2010 19:43:05 -0000
 @@ -843,9 +843,15 @@ newroute(int argc, char *const *argv)
                        case K_REJECT:
                                flags |= RTF_REJECT;
                                break;
 +                      case K_NOREJECT:
 +                              flags &= ~RTF_REJECT;
 +                              break;
                        case K_BLACKHOLE:
                                flags |= RTF_BLACKHOLE;
                                break;
 +                      case K_NOBLACKHOLE:
 +                              flags &= ~RTF_BLACKHOLE;
 +                              break;
                        case K_CLONED:
                                flags |= RTF_CLONED;
                                break;
 
 --------------010209080508090403020908--
 


Home | Main Index | Thread Index | Old Index