Revision ba321706 sysdep/unix/krt-iface.c

View differences:

sysdep/unix/krt-iface.c
89 89
	{ err = "SIOCGIFNETMASK"; goto faulty; }
90 90
      get_sockaddr((struct sockaddr_in *) &r->ifr_addr, &netmask, NULL, 0);
91 91
      l = ipa_mklen(netmask);
92
      if (l < 0 || l == 31)
92
      if (l < 0)
93 93
	{
94 94
	  log(L_ERR "%s: Invalid netmask (%x)", i.name, netmask);
95 95
	  goto bad;
......
139 139
	    i.flags |= IF_BROADCAST;
140 140
	  if (a.pxlen < 30)
141 141
	    i.flags |= IF_MULTIACCESS;
142
	  else
143
	    a.opposite = ipa_opposite(a.ip, a.pxlen);
142
	  if (a.pxlen == 30)
143
	    ifa.opposite = ipa_opposite_m2(ifa.ip);
144
	  if (a.pxlen == 31)
145
	    ifa.opposite = ipa_opposite_m1(ifa.ip);
144 146
	}
145 147
      else
146 148
	a.brd = a.opposite;

Also available in: Unified diff