if_ether.c (45705) | if_ether.c (46568) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 |
34 * $Id: if_ether.c,v 1.56 1999/03/10 10:11:43 julian Exp $ | 34 * $Id: if_ether.c,v 1.57 1999/04/15 17:58:24 eivind Exp $ |
35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 496 unchanged lines hidden (view full) --- 539 inet_ntoa(isaddr), 540 rt->rt_ifp->if_name, rt->rt_ifp->if_unit, 541 ea->arp_sha, ":", 542 ac->ac_if.if_name, ac->ac_if.if_unit); 543 goto reply; 544 } 545#endif 546 if (sdl->sdl_alen && | 35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 496 unchanged lines hidden (view full) --- 539 inet_ntoa(isaddr), 540 rt->rt_ifp->if_name, rt->rt_ifp->if_unit, 541 ea->arp_sha, ":", 542 ac->ac_if.if_name, ac->ac_if.if_unit); 543 goto reply; 544 } 545#endif 546 if (sdl->sdl_alen && |
547 bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) | 547 bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) { |
548 if (rt->rt_expire) 549 log(LOG_INFO, "arp: %s moved from %6D to %6D on %s%d\n", 550 inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":", 551 ea->arp_sha, ":", 552 ac->ac_if.if_name, ac->ac_if.if_unit); 553 else { 554 log(LOG_ERR, 555 "arp: %6D attempts to modify permanent entry for %s on %s%d", 556 ea->arp_sha, ":", inet_ntoa(isaddr), 557 ac->ac_if.if_name, ac->ac_if.if_unit); 558 goto reply; 559 } | 548 if (rt->rt_expire) 549 log(LOG_INFO, "arp: %s moved from %6D to %6D on %s%d\n", 550 inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":", 551 ea->arp_sha, ":", 552 ac->ac_if.if_name, ac->ac_if.if_unit); 553 else { 554 log(LOG_ERR, 555 "arp: %6D attempts to modify permanent entry for %s on %s%d", 556 ea->arp_sha, ":", inet_ntoa(isaddr), 557 ac->ac_if.if_name, ac->ac_if.if_unit); 558 goto reply; 559 } |
560 } |
|
560 (void)memcpy(LLADDR(sdl), ea->arp_sha, sizeof(ea->arp_sha)); 561 sdl->sdl_alen = sizeof(ea->arp_sha); 562 sdl->sdl_rcf = NULL; 563 /* 564 * If we receive an arp from a token-ring station over 565 * a token-ring nic then try to save the source 566 * routing info. 567 */ --- 190 unchanged lines hidden --- | 561 (void)memcpy(LLADDR(sdl), ea->arp_sha, sizeof(ea->arp_sha)); 562 sdl->sdl_alen = sizeof(ea->arp_sha); 563 sdl->sdl_rcf = NULL; 564 /* 565 * If we receive an arp from a token-ring station over 566 * a token-ring nic then try to save the source 567 * routing info. 568 */ --- 190 unchanged lines hidden --- |