summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rarpd
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-01-31 08:55:21 +0000
committerglebius <glebius@FreeBSD.org>2013-01-31 08:55:21 +0000
commit7f832c3059b3b2f864f0b1f3fac0c4ed8e268b27 (patch)
treee3ea2bc458475248ba21882d2e6ebd842532550e /usr.sbin/rarpd
parente33dc79d8ee6e651f229bdeddaa7109185cb20db (diff)
downloadFreeBSD-src-7f832c3059b3b2f864f0b1f3fac0c4ed8e268b27.zip
FreeBSD-src-7f832c3059b3b2f864f0b1f3fac0c4ed8e268b27.tar.gz
Retire struct sockaddr_inarp.
Since ARP and routing are separated, "proxy only" entries don't have any meaning, thus we don't need additional field in sockaddr to pass SIN_PROXY flag. New kernel is binary compatible with old tools, since sizes of sockaddr_inarp and sockaddr_in match, and sa_family are filled with same value. The structure declaration is left for compatibility with third party software, but in tree code no longer use it. Reviewed by: ru, andre, net@
Diffstat (limited to 'usr.sbin/rarpd')
-rw-r--r--usr.sbin/rarpd/rarpd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c
index f10a7da..5386185 100644
--- a/usr.sbin/rarpd/rarpd.c
+++ b/usr.sbin/rarpd/rarpd.c
@@ -692,11 +692,10 @@ rarp_process(struct if_info *ii, u_char *pkt, u_int len)
* host (i.e. the guy running rarpd), won't try to ARP for the hardware
* address of the guy being booted (he cannot answer the ARP).
*/
-struct sockaddr_inarp sin_inarp = {
- sizeof(struct sockaddr_inarp), AF_INET, 0,
+struct sockaddr_in sin_inarp = {
+ sizeof(struct sockaddr_in), AF_INET, 0,
{0},
{0},
- 0, 0
};
struct sockaddr_dl sin_dl = {
sizeof(struct sockaddr_dl), AF_LINK, 0, IFT_ETHER, 0, 6,
@@ -712,7 +711,7 @@ update_arptab(u_char *ep, in_addr_t ipaddr)
{
struct timespec tp;
int cc;
- struct sockaddr_inarp *ar, *ar2;
+ struct sockaddr_in *ar, *ar2;
struct sockaddr_dl *ll, *ll2;
struct rt_msghdr *rt;
int xtype, xindex;
@@ -740,7 +739,7 @@ update_arptab(u_char *ep, in_addr_t ipaddr)
rt->rtm_addrs = RTA_DST;
rt->rtm_type = RTM_GET;
rt->rtm_seq = ++seq;
- ar2 = (struct sockaddr_inarp *)rtmsg.rtspace;
+ ar2 = (struct sockaddr_in *)rtmsg.rtspace;
bcopy(ar, ar2, sizeof(*ar));
rt->rtm_msglen = sizeof(*rt) + sizeof(*ar);
errno = 0;
OpenPOWER on IntegriCloud