Deleted Added
full compact
ndp.c (245230) ndp.c (246143)
1/* $FreeBSD: head/usr.sbin/ndp/ndp.c 245230 2013-01-09 18:18:08Z ume $ */
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 }
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 /*
440 * IPv4 arp command retries with sin_other = SIN_PROXY here.
441 */
442 fprintf(stderr, "set: cannot configure a new entry\n");
443 return 1;
444 }
445
446overwrite:
447 if (sdl->sdl_family != AF_LINK) {
448 printf("cannot intuit interface index and type for %s\n", host);
449 return (1);

--- 68 unchanged lines hidden (view full) ---

518 }
519 sin = (struct sockaddr_in6 *)(rtm + 1);
520 sdl = (struct sockaddr_dl *)(ROUNDUP(sin->sin6_len) + (char *)sin);
521 if (IN6_ARE_ADDR_EQUAL(&sin->sin6_addr, &sin_m.sin6_addr)) {
522 if (sdl->sdl_family == AF_LINK &&
523 !(rtm->rtm_flags & RTF_GATEWAY)) {
524 goto delete;
525 }
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 }
526 /*
527 * IPv4 arp command retries with sin_other = SIN_PROXY here.
528 */
529 fprintf(stderr, "delete: cannot delete non-NDP entry\n");
530 return 1;
531 }
532
533delete:
534 if (sdl->sdl_family != AF_LINK) {
535 printf("cannot locate %s\n", host);
536 return (1);

--- 1061 unchanged lines hidden ---
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 ---