Deleted Added
full compact
if_ether.c (217829) if_ether.c (218909)
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

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

31
32/*
33 * Ethernet address resolution protocol.
34 * TODO:
35 * add "inuse/lock" bit (or ref. count) along with valid bit
36 */
37
38#include <sys/cdefs.h>
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

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

31
32/*
33 * Ethernet address resolution protocol.
34 * TODO:
35 * add "inuse/lock" bit (or ref. count) along with valid bit
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/netinet/if_ether.c 217829 2011-01-25 17:15:23Z thompsa $");
39__FBSDID("$FreeBSD: head/sys/netinet/if_ether.c 218909 2011-02-21 09:01:34Z brucec $");
40
41#include "opt_inet.h"
42
43#include <sys/param.h>
44#include <sys/kernel.h>
45#include <sys/queue.h>
46#include <sys/sysctl.h>
47#include <sys/systm.h>

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

805 }
806 RTFREE_LOCKED(rt);
807
808 (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);
809 (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln);
810
811 /*
812 * Also check that the node which sent the ARP packet
40
41#include "opt_inet.h"
42
43#include <sys/param.h>
44#include <sys/kernel.h>
45#include <sys/queue.h>
46#include <sys/sysctl.h>
47#include <sys/systm.h>

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

805 }
806 RTFREE_LOCKED(rt);
807
808 (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);
809 (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln);
810
811 /*
812 * Also check that the node which sent the ARP packet
813 * is on the the interface we expect it to be on. This
813 * is on the interface we expect it to be on. This
814 * avoids ARP chaos if an interface is connected to the
815 * wrong network.
816 */
817 sin.sin_addr = isaddr;
818
819 /* XXX MRT use table 0 for arp checks */
820 rt = in_rtalloc1((struct sockaddr *)&sin, 0, 0UL, 0);
821 if (!rt)

--- 90 unchanged lines hidden ---
814 * avoids ARP chaos if an interface is connected to the
815 * wrong network.
816 */
817 sin.sin_addr = isaddr;
818
819 /* XXX MRT use table 0 for arp checks */
820 rt = in_rtalloc1((struct sockaddr *)&sin, 0, 0UL, 0);
821 if (!rt)

--- 90 unchanged lines hidden ---