1/* $FreeBSD: head/usr.sbin/ndp/ndp.c 246143 2013-01-31 08:55:21Z glebius $ */ |
2/* $KAME: ndp.c,v 1.104 2003/06/27 07:48:39 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 421 unchanged lines hidden (view full) --- 431 !(rtm->rtm_flags & RTF_GATEWAY)) { 432 switch (sdl->sdl_type) { 433 case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: 434 case IFT_ISO88024: case IFT_ISO88025: 435 case IFT_L2VLAN: case IFT_BRIDGE: 436 goto overwrite; 437 } 438 } |
439 fprintf(stderr, "set: cannot configure a new entry\n"); 440 return 1; 441 } 442 443overwrite: 444 if (sdl->sdl_family != AF_LINK) { 445 printf("cannot intuit interface index and type for %s\n", host); 446 return (1); --- 68 unchanged lines hidden (view full) --- 515 } 516 sin = (struct sockaddr_in6 *)(rtm + 1); 517 sdl = (struct sockaddr_dl *)(ROUNDUP(sin->sin6_len) + (char *)sin); 518 if (IN6_ARE_ADDR_EQUAL(&sin->sin6_addr, &sin_m.sin6_addr)) { 519 if (sdl->sdl_family == AF_LINK && 520 !(rtm->rtm_flags & RTF_GATEWAY)) { 521 goto delete; 522 } |
523 fprintf(stderr, "delete: cannot delete non-NDP entry\n"); 524 return 1; 525 } 526 527delete: 528 if (sdl->sdl_family != AF_LINK) { 529 printf("cannot locate %s\n", host); 530 return (1); --- 1061 unchanged lines hidden --- |