From nobody@FreeBSD.org  Sat Nov  7 14:26:15 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A0E94106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Nov 2009 14:26:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8FDC18FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Nov 2009 14:26:15 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7EQF7G006144
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 7 Nov 2009 14:26:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nA7EQE04006143;
	Sat, 7 Nov 2009 14:26:14 GMT
	(envelope-from nobody)
Message-Id: <200911071426.nA7EQE04006143@www.freebsd.org>
Date: Sat, 7 Nov 2009 14:26:14 GMT
From: Oleg Ginzburg <oleg.ginzburg@nevosoft.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: arp: writing to routing socket: Invalid argument with -S key usage
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140358
>Category:       kern
>Synopsis:       8.0RC2: [arp] arp: writing to routing socket: Invalid argument with -S key usage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    qingli
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 07 14:30:01 UTC 2009
>Closed-Date:    
>Last-Modified:  Thu Oct 17 22:10:00 UTC 2013
>Originator:     Oleg Ginzburg
>Release:        8.0-RC2
>Organization:
>Environment:
FreeBSD localhost.my.domain 8.0-RC2 FreeBSD 8.0-RC2 #0: Thu Nov  5 20:13:11 MSK 2009     root@localhost.my.domain:/usr/obj/usr/src/sys/GENERIC-VIMAGE  amd64
>Description:
When i try 

/usr/sbin/arp -S IP 0:24:21:51:b1:1e pub

(where IP from my networks)

arp works successful and return errors message:

arp: writing to routing socket: Invalid argument

Some soft who analyzing return code (for example, net/mpd5 with proxy-arp settings) work incorrectly when doing system(3) for /usr/sbin/arp.

With 7x branch behaviors is fine

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sat Nov 7 14:32:34 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s).  I can verify this on my machine (19th Oct HEAD) 
so it's not due to his custom kernel. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140358 
Responsible-Changed-From-To: freebsd-net->qingli 
Responsible-Changed-By: qingli 
Responsible-Changed-When: Wed Dec 9 23:17:52 UTC 2009 
Responsible-Changed-Why:  
Take ownership of this issue. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=140358 

From: sd <sddex@ya.ru>
To: bug-followup@FreeBSD.org, oleg.ginzburg@nevosoft.ru
Cc:  
Subject: Re: kern/140358: 8.0RC2: [arp] arp: writing to routing socket: Invalid
 argument with -S key usage
Date: Fri, 18 Oct 2013 02:00:04 +0400

 How-To-Repeat
 
 # uname -a
 FreeBSD a 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 
 03:52:52 UTC 2013 
 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
 
 # ifconfig em0 inet 10.0.0.1/24
 # ifconfig em1 inet 10.0.1.1/16    #note the 2nd net includes 1st net
 # ifconfig
 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
          options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
          ether 08:00:27:06:94:50
          inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
          nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
          media: Ethernet autoselect (1000baseT <full-duplex>)
          status: active
 em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
          options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
          ether 08:00:27:16:75:d3
          inet 10.0.1.1 netmask 0xffff0000 broadcast 10.0.255.255
          nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
          media: Ethernet autoselect (1000baseT <full-duplex>)
          status: active
 
 # netstat -rnf inet    #note network addresses are identical
 Destination        Gateway            Flags    Refs      Use  Netif Expire
 10.0.0.0/24        link#1             U           0      110    em0 =>
 10.0.0.0/16        link#2             U           0        0    em1
 10.0.0.1           link#1             UHS         0        0    lo0
 10.0.1.1           link#2             UHS         0        0    lo0
 127.0.0.1          link#3             UH          0       48    lo0
 
 # arp -s 10.0.2.1 auto pub    #note correct iface and MAC
 using interface em1 for proxy with address 08:00:27:16:75:d3
 
 # arp -an    #note incorrect iface and correct MAC
 ? (10.0.1.1) at 08:00:27:16:75:d3 on em1 permanent [ethernet]
 ? (10.0.2.1) at 08:00:27:16:75:d3 on em0 permanent published [ethernet]
 ? (10.0.0.1) at 08:00:27:06:94:50 on em0 permanent [ethernet]
 
 # arp -d 10.0.2.1
 arp: writing to routing socket: Invalid argument
 
 # arp -an    #note nothing was changed
 ? (10.0.1.1) at 08:00:27:16:75:d3 on em1 permanent [ethernet]
 ? (10.0.2.1) at 08:00:27:16:75:d3 on em0 permanent published [ethernet]
 ? (10.0.0.1) at 08:00:27:06:94:50 on em0 permanent [ethernet]
>Unformatted:
