On Wed, Sep 13, 2017 at 05:51:27AM +0300, Artturi Alm wrote:
> Hi,
> 
> even after having recently updated the phone to a newer version of android,
> i'm still spammed by urndis w/msg on subject.
> 
> doesn't really matter to me what you do to silence it, but something like
> below does work for me, and thanks in advacne:)
> -Artturi
> 

ping?
i was told i don't reason my diffs, so here's sorry attempt:
$ dmesg | wc -l
    1040
$ dmesg | grep urndis_decap | wc -l
    1039

either of the diffs below would work for me.
-Artturi


... this ...

diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 5d148da4ab5..7dc12573c0d 100644
--- a/sys/dev/usb/if_urndis.c
+++ b/sys/dev/usb/if_urndis.c
@@ -834,11 +834,11 @@ urndis_decap(struct urndis_softc *sc, struct urndis_chain 
*c, u_int32_t len)
                    len));
 
                if (len < sizeof(*msg)) {
-                       printf("%s: urndis_decap invalid buffer len %u < "
+                       DPRINTF(("%s: urndis_decap invalid buffer len %u < "
                            "minimum header %zu\n",
                            DEVNAME(sc),
                            len,
-                           sizeof(*msg));
+                           sizeof(*msg)));
                        return;
                }
 


... or this ...

diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 5d148da4ab5..4b2c6e89ec9 100644
--- a/sys/dev/usb/if_urndis.c
+++ b/sys/dev/usb/if_urndis.c
@@ -834,6 +834,8 @@ urndis_decap(struct urndis_softc *sc, struct urndis_chain 
*c, u_int32_t len)
                    len));
 
                if (len < sizeof(*msg)) {
+                       if (len == 1)   /* workaround for spamming androids */
+                               return;
                        printf("%s: urndis_decap invalid buffer len %u < "
                            "minimum header %zu\n",
                            DEVNAME(sc),

Reply via email to