]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #4773 from thozza/31-prefix-bcast-addr
authorRuss White <russ@riw.us>
Tue, 28 Jan 2020 16:42:45 +0000 (11:42 -0500)
committerGitHub <noreply@github.com>
Tue, 28 Jan 2020 16:42:45 +0000 (11:42 -0500)
ipv4_broadcast_addr() didn't comply with RFC3021

1  2 
lib/prefix.c
lib/prefix.h

diff --cc lib/prefix.c
Simple merge
diff --cc lib/prefix.h
index 667627ddfe804aa10e8b577ffdf622ada2942a89,7a7e13518a1fd91b957dea67235b2fb54279949f..fb80c4ca6cab9430f7bc3ceeb6b00ce49a1a5a91
@@@ -449,10 -447,11 +449,9 @@@ extern void apply_classful_mask_ipv4(st
  
  extern uint8_t ip_masklen(struct in_addr);
  extern void masklen2ip(const int, struct in_addr *);
 -/* returns the network portion of the host address */
 -extern in_addr_t ipv4_network_addr(in_addr_t hostaddr, int masklen);
  /* given the address of a host on a network and the network mask length,
   * calculate the broadcast address for that network;
-  * special treatment for /31: returns the address of the other host
-  * on the network by flipping the host bit */
+  * special treatment for /31 according to RFC3021 section 3.3 */
  extern in_addr_t ipv4_broadcast_addr(in_addr_t hostaddr, int masklen);
  
  extern int netmask_str2prefix_str(const char *, const char *, char *);