[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] bug 8926 - Arping dropping leading 0 from mac address
From:       Vito_Mulè <mule.vito () gmail ! com>
Date:       2016-05-28 23:59:15
Message-ID: CAFy+01Nq7phRXX6AmrdNJCJNnB9EGbKwvGF67Ak=pmt2Uk4=8w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,
makes sense.
Thanks for explaining this.
Cheers

On 29 May 2016 at 00:57, John Schroeder <jschroed@gmail.com> wrote:

> Hi Vito,
>
> From what I understand, you need to add a "Signed-off-by" line to your
> patches if you want your name/email attached to your patch. Otherwise, the
> busybox devs will keep your patch anonymous since some people wish to
> remain so by default. You can look at some previously submitted patches to
> see how others did this.
>
> --John Schroeder
>
> Thanks.
> Not complaining but I would have expected to be quoted in the commit.
> Not a big deal, it was a small patch.
>
> Cheers
>
> On Thursday, 26 May 2016, Denys Vlasenko < <vda.linux@googlemail.com>
> vda.linux@googlemail.com> wrote:
>
>> Fixed in git, thanks!
>>
>> On Wed, May 25, 2016 at 5:24 PM, Vito Mulè <mule.vito@gmail.com> wrote:
>> > friendly ping
>> >
>> > ---------- Forwarded message ----------
>> > From: Vito Mulè <mule.vito@gmail.com>
>> > Date: 16 May 2016 at 18:16
>> > Subject: Fwd: bug 8926 - Arping dropping leading 0 from mac address
>> > To: busybox@busybox.net
>> >
>> >
>> > Hello,
>> > not sure if this is necessary since I've opened the bug already,
>> apologies
>> > in case it's not.
>> > Bug link: https://bugs.busybox.net/show_bug.cgi?id=8926
>> >
>> >
>> > Not sure if this is intende but busybox arping is not consistent with
>> arping
>> > on linux, printing MAC addressed.
>> >
>> >
>> > root@agent4:/home/vmule# arping 192.168.1.159
>> > ARPING 192.168.1.159
>> > 60 bytes from 08:00:27:86:47:9d (192.168.1.159): index=0 time=1.002 sec
>> >
>> > and this is busybox arping
>> > root@agent4:/home/vmule# busybox arping 192.168.1.159
>> > ARPING to 192.168.1.159 from 192.168.1.157 via eth0
>> > Unicast reply from 192.168.1.159 [8:0:27:86:47:9d] 0.314ms
>> >
>> > I wrote a small patch to fix it:
>> >
>> >
>> > diff --git a/networking/arping.c b/networking/arping.c
>> > index 6b0de4d..2b22451 100644
>> > --- a/networking/arping.c
>> > +++ b/networking/arping.c
>> > @@ -230,12 +230,15 @@ static void recv_pack(unsigned char *buf, int len,
>> > struct sockaddr_ll *FROM)
>> >         }
>> >         if (!(option_mask32 & QUIET)) {
>> >                 int s_printed = 0;
>> > +               struct ether_addr* mac = (struct ether_addr *) p;
>> >
>> > -               printf("%scast re%s from %s [%s]",
>> > +               printf("%scast re%s from %s
>> [%02x:%02x:%02x:%02x:%02x:%02x]
>> > ",
>> >                         FROM->sll_pkttype == PACKET_HOST ? "Uni" :
>> "Broad",
>> >                         ah->ar_op == htons(ARPOP_REPLY) ? "ply" :
>> "quest",
>> >                         inet_ntoa(src_ip),
>> > -                       ether_ntoa((struct ether_addr *) p));
>> > +                       mac->ether_addr_octet[0],
>> mac->ether_addr_octet[1],
>> > +                       mac->ether_addr_octet[2],
>> mac->ether_addr_octet[3],
>> > +                       mac->ether_addr_octet[4],
>> mac->ether_addr_octet[5]);
>> >                 if (dst_ip.s_addr != src.s_addr) {
>> >                         printf("for %s ", inet_ntoa(dst_ip));
>> >                         s_printed = 1;
>> > @@ -243,8 +246,11 @@ static void recv_pack(unsigned char *buf, int len,
>> > struct sockaddr_ll *FROM)
>> >                 if (memcmp(p + ah->ar_hln + 4, me.sll_addr,
>> ah->ar_hln)) {
>> >                         if (!s_printed)
>> >                                 printf("for ");
>> > -                       printf("[%s]",
>> > -                               ether_ntoa((struct ether_addr *) p +
>> > ah->ar_hln + 4));
>> > +                       struct ether_addr* mac2 = mac + ah->ar_hln + 4;
>> > +                       printf("[%02x:%02x:%02x:%02x:%02x:%02x]",
>> > +                               mac2->ether_addr_octet[0],
>> > mac2->ether_addr_octet[1],
>> > +                               mac2->ether_addr_octet[2],
>> > mac2->ether_addr_octet[3],
>> > +                               mac2->ether_addr_octet[4],
>> > mac2->ether_addr_octet[5]);
>> >                 }
>> >
>> >                 if (last) {
>> >
>> >
>> > Ideas?
>> >
>> >
>> > Cheers
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > busybox mailing list
>> > busybox@busybox.net
>> > http://lists.busybox.net/mailman/listinfo/busybox
>>
>
>
> _______________________________________________
> busybox mailing listbusybox@busybox.nethttp://lists.busybox.net/mailman/listinfo/busybox
>
>
>

[Attachment #5 (text/html)]

<div dir="ltr">Hello,<div>makes sense.</div><div>Thanks for explaining \
this.</div><div>Cheers</div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On 29 May 2016 at 00:57, John Schroeder <span dir="ltr">&lt;<a \
href="mailto:jschroed@gmail.com" target="_blank">jschroed@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Vito, <br>
      <br>
      From what I understand, you need to add a &quot;Signed-off-by&quot; line to
      your patches if you want your name/email attached to your patch.
      Otherwise, the busybox devs will keep your patch anonymous since
      some people wish to remain so by default. You can look at some
      previously submitted patches to see how others did this.<span \
class="HOEnZb"><font color="#888888"><br>  </font></span></div><span \
class="HOEnZb"><font color="#888888">  <div><br>
      --John  Schroeder</div></font></span><div><div class="h5">
    <blockquote type="cite">Thanks.
      <div>Not complaining but I would have expected to be quoted in the
        commit.</div>
      <div>Not a big deal, it was a small patch.</div>
      <div><br>
      </div>
      <div>Cheers<br>
        <br>
        On Thursday, 26 May 2016, Denys Vlasenko &lt;<a \
href="mailto:vda.linux@googlemail.com" target="_blank"></a><a \
href="mailto:vda.linux@googlemail.com" \
target="_blank">vda.linux@googlemail.com</a>&gt;  wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Fixed in  git, thanks!<br>
          <br>
          On Wed, May 25, 2016 at 5:24 PM, Vito Mulè &lt;<a></a><a \
href="mailto:mule.vito@gmail.com" target="_blank">mule.vito@gmail.com</a>&gt;  \
wrote:<br>  &gt; friendly ping<br>
          &gt;<br>
          &gt; ---------- Forwarded message ----------<br>
          &gt; From: Vito Mulè &lt;<a>mule.vito@gmail.com</a>&gt;<br>
          &gt; Date: 16 May 2016 at 18:16<br>
          &gt; Subject: Fwd: bug 8926 - Arping dropping leading 0 from
          mac address<br>
          &gt; To: <a>busybox@busybox.net</a><br>
          &gt;<br>
          &gt;<br>
          &gt; Hello,<br>
          &gt; not sure if this is necessary since I&#39;ve opened the bug
          already, apologies<br>
          &gt; in case it&#39;s not.<br>
          &gt; Bug link: <a href="https://bugs.busybox.net/show_bug.cgi?id=8926" \
target="_blank">https://bugs.busybox.net/show_bug.cgi?id=8926</a><br>  &gt;<br>
          &gt;<br>
          &gt; Not sure if this is intende but busybox arping is not
          consistent with arping<br>
          &gt; on linux, printing MAC addressed.<br>
          &gt;<br>
          &gt;<br>
          &gt; root@agent4:/home/vmule# arping 192.168.1.159<br>
          &gt; ARPING 192.168.1.159<br>
          &gt; 60 bytes from 08:00:27:86:47:9d (192.168.1.159): index=0
          time=1.002 sec<br>
          &gt;<br>
          &gt; and this is busybox arping<br>
          &gt; root@agent4:/home/vmule# busybox arping 192.168.1.159<br>
          &gt; ARPING to 192.168.1.159 from 192.168.1.157 via eth0<br>
          &gt; Unicast reply from 192.168.1.159 [8:0:27:86:47:9d]
          0.314ms<br>
          &gt;<br>
          &gt; I wrote a small patch to fix it:<br>
          &gt;<br>
          &gt;<br>
          &gt; diff --git a/networking/arping.c b/networking/arping.c<br>
          &gt; index 6b0de4d..2b22451 100644<br>
          &gt; --- a/networking/arping.c<br>
          &gt; +++ b/networking/arping.c<br>
          &gt; @@ -230,12 +230,15 @@ static void recv_pack(unsigned char
          *buf, int len,<br>
          &gt; struct sockaddr_ll *FROM)<br>
          &gt;              }<br>
          &gt;              if (!(option_mask32 &amp; QUIET)) {<br>
          &gt;                          int s_printed = 0;<br>
          &gt; +                       struct ether_addr* mac = (struct
          ether_addr *) p;<br>
          &gt;<br>
          &gt; -                       printf(&quot;%scast re%s from %s \
[%s]&quot;,<br>  &gt; +                       printf(&quot;%scast re%s from %s
          [%02x:%02x:%02x:%02x:%02x:%02x]<br>
          &gt; &quot;,<br>
          &gt;                                      FROM-&gt;sll_pkttype ==
          PACKET_HOST ? &quot;Uni&quot; : &quot;Broad&quot;,<br>
          &gt;                                      ah-&gt;ar_op ==
          htons(ARPOP_REPLY) ? &quot;ply&quot; : &quot;quest&quot;,<br>
          &gt;                                      inet_ntoa(src_ip),<br>
          &gt; -                                   ether_ntoa((struct ether_addr *)
          p));<br>
          &gt; +                                   mac-&gt;ether_addr_octet[0],
          mac-&gt;ether_addr_octet[1],<br>
          &gt; +                                   mac-&gt;ether_addr_octet[2],
          mac-&gt;ether_addr_octet[3],<br>
          &gt; +                                   mac-&gt;ether_addr_octet[4],
          mac-&gt;ether_addr_octet[5]);<br>
          &gt;                          if (dst_ip.s_addr != src.s_addr) {<br>
          &gt;                                      printf(&quot;for %s &quot;,
          inet_ntoa(dst_ip));<br>
          &gt;                                      s_printed = 1;<br>
          &gt; @@ -243,8 +246,11 @@ static void recv_pack(unsigned char
          *buf, int len,<br>
          &gt; struct sockaddr_ll *FROM)<br>
          &gt;                          if (memcmp(p + ah-&gt;ar_hln + 4,
          me.sll_addr, ah-&gt;ar_hln)) {<br>
          &gt;                                      if (!s_printed)<br>
          &gt;                                                  printf(&quot;for \
                &quot;);<br>
          &gt; -                                   printf(&quot;[%s]&quot;,<br>
          &gt; -                                               ether_ntoa((struct
          ether_addr *) p +<br>
          &gt; ah-&gt;ar_hln + 4));<br>
          &gt; +                                   struct ether_addr* mac2 = mac +
          ah-&gt;ar_hln + 4;<br>
          &gt; +                                
            printf(&quot;[%02x:%02x:%02x:%02x:%02x:%02x]&quot;,<br>
          &gt; +                                            
            mac2-&gt;ether_addr_octet[0],<br>
          &gt; mac2-&gt;ether_addr_octet[1],<br>
          &gt; +                                            
            mac2-&gt;ether_addr_octet[2],<br>
          &gt; mac2-&gt;ether_addr_octet[3],<br>
          &gt; +                                            
            mac2-&gt;ether_addr_octet[4],<br>
          &gt; mac2-&gt;ether_addr_octet[5]);<br>
          &gt;                          }<br>
          &gt;<br>
          &gt;                          if (last) {<br>
          &gt;<br>
          &gt;<br>
          &gt; Ideas?<br>
          &gt;<br>
          &gt;<br>
          &gt; Cheers<br>
          &gt;<br>
          &gt;<br>
          &gt;<br>
          &gt;<br>
          &gt; _______________________________________________<br>
          &gt; busybox mailing list<br>
          &gt; <a>busybox@busybox.net</a><br>
          &gt; <a href="http://lists.busybox.net/mailman/listinfo/busybox" \
target="_blank">http://lists.busybox.net/mailman/listinfo/busybox</a><br>  \
</blockquote>  </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
busybox mailing list
<a href="mailto:busybox@busybox.net" target="_blank">busybox@busybox.net</a>
<a href="http://lists.busybox.net/mailman/listinfo/busybox" \
target="_blank">http://lists.busybox.net/mailman/listinfo/busybox</a></pre>  \
</blockquote>  <br>
  </div></div></div>

</blockquote></div><br></div>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic