* XXX the function may need more improvement... */
| 1227 | * XXX the function may need more improvement... |
| 1228 | */ |
| 1229 | static int |
| 1230 | inet6_makenetandmask(struct sockaddr_in6 *sin6, const char *plen) |
| 1231 | { |
| 1232 | |
| 1233 | if (plen == NULL) { |
| 1234 | if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && |
| 1235 | sin6->sin6_scope_id == 0) |
| 1236 | plen = "0"; |
| 1237 | } |
| 1238 | |
| 1239 | if (plen == NULL || strcmp(plen, "128") == 0) |
| 1240 | return (1); |
| 1241 | rtm_addrs |= RTA_NETMASK; |
| 1242 | prefixlen(plen); |
| 1243 | return (0); |
| 1244 | } |
| 1245 | #endif |
| 1246 | |
| 1247 | /* |