Revision 9b136840 nest/neighbor.c

View differences:

nest/neighbor.c
81 81
	{
82 82
	  if (ipa_in_netX(*a, &b->prefix))
83 83
	    {
84
#ifndef IPV6
85
	      if ((b->pxlen < (BITS_PER_IP_ADDRESS - 1)) &&
86
		  (ipa_equal(*a, b->prefix) ||	/* Network address */
84
	      /* Do not allow IPv4 network and broadcast addresses */
85
	      if (ipa_is_ip4(*a) &&
86
		  (net_pxlen(&b->prefix) < (BITS_PER_IP_ADDRESS - 1)) &&
87
		  (ipa_equal(*a, net_prefix(&b->prefix)) ||	/* Network address */
87 88
		   ipa_equal(*a, b->brd)))	/* Broadcast */
88 89
	      {
89 90
		*ap = NULL;
90 91
		return -1;
91 92
	      }
92
#endif
93 93

  
94 94
	      return b->scope;
95 95
	    }

Also available in: Unified diff