[Toybox] [PATCH] arp -i <interface> -s <> <> fix for setting up a new entry

Sameer Pradhan sameer.p.pradhan at gmail.com
Tue May 3 23:28:39 PDT 2016


Hi Rob and List,

One bug reported as:

"arp -i <interface> -s <> <>" should set up a new entry to the table but
its failing here.

$ sudo ./toybox arp -i eth0 -s 1.1.1.1 00:00:00:00:00:0e
*arp: ioctl 8955: Network is unreachable*

$ ./toybox arp -a
? (107.109.229.1) at 00:00:0c:07:ac:2a [ether] on eth0
DO-SP-PRADHAN09.local (107.109.229.9) at 50:b7:c3:a1:f6:66 [ether] on eth0


This small fix also includes clean up of an extra global variable.

*After fix:*

$ sudo ./toybox arp -i eth0 -s 1.1.1.1 00:00:00:00:00:0e
$ ./toybox arp -a
? (1.1.1.1) at 00:00:00:00:00:0e [ether] PERM on eth0
? (107.109.229.1) at 00:00:0c:07:ac:2a [ether] on eth0
DO-SP-PRADHAN09.local (107.109.229.9) at 50:b7:c3:a1:f6:66 [ether] on eth0
$ sudo ./toybox arp -i eth0 -d 1.1.1.1
$ ./toybox arp -a
? (107.109.229.1) at 00:00:0c:07:ac:2a [ether] on eth0
DO-SP-PRADHAN09.local (107.109.229.9) at 50:b7:c3:a1:f6:66 [ether] on eth0
$


Find the patch as attachment.
Please have a look,





-- 
Thanks & Regards
Sameer Prakash Pradhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160504/0f6efc5c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arp.c.patch
Type: application/octet-stream
Size: 1738 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160504/0f6efc5c/attachment-0003.obj>


More information about the Toybox mailing list