diff mbox series

[ovs-dev] netdev-linux: Don't include <net/if_packet.h>.

Message ID 20181003223949.5072-1-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev] netdev-linux: Don't include <net/if_packet.h>. | expand

Commit Message

Ben Pfaff Oct. 3, 2018, 10:39 p.m. UTC
This header only defines sockaddr_pkt, which this source file doesn't use.

This was the only user of net/if_packet.h, so also remove the
configure-time test for it (which netdev-linux wasn't using anyway).

Reported-by: Andre McCurdy <armccurdy@gmail.com>
Reported-at: https://github.com/openvswitch/ovs/pull/253
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 acinclude.m4       | 11 -----------
 configure.ac       |  1 -
 lib/netdev-linux.c |  1 -
 3 files changed, 13 deletions(-)

Comments

Justin Pettit Oct. 3, 2018, 10:51 p.m. UTC | #1
> On Oct 3, 2018, at 3:39 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> This header only defines sockaddr_pkt, which this source file doesn't use.
> 
> This was the only user of net/if_packet.h, so also remove the
> configure-time test for it (which netdev-linux wasn't using anyway).
> 
> Reported-by: Andre McCurdy <armccurdy@gmail.com>
> Reported-at: https://github.com/openvswitch/ovs/pull/253
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Acked-by: Justin Pettit <jpettit@ovn.org>

--Justin
Ben Pfaff Oct. 4, 2018, 1:26 a.m. UTC | #2
On Wed, Oct 03, 2018 at 03:51:40PM -0700, Justin Pettit wrote:
> 
> > On Oct 3, 2018, at 3:39 PM, Ben Pfaff <blp@ovn.org> wrote:
> > 
> > This header only defines sockaddr_pkt, which this source file doesn't use.
> > 
> > This was the only user of net/if_packet.h, so also remove the
> > configure-time test for it (which netdev-linux wasn't using anyway).
> > 
> > Reported-by: Andre McCurdy <armccurdy@gmail.com>
> > Reported-at: https://github.com/openvswitch/ovs/pull/253
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> 
> Acked-by: Justin Pettit <jpettit@ovn.org>

Thanks, applied to master.
diff mbox series

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 8d850349817f..ed83df43df54 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -906,17 +906,6 @@  AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   fi
 ])
 
-dnl Checks for net/if_packet.h.
-AC_DEFUN([OVS_CHECK_IF_PACKET],
-  [AC_CHECK_HEADER([net/if_packet.h],
-                   [HAVE_IF_PACKET=yes],
-                   [HAVE_IF_PACKET=no])
-   AM_CONDITIONAL([HAVE_IF_PACKET], [test "$HAVE_IF_PACKET" = yes])
-   if test "$HAVE_IF_PACKET" = yes; then
-      AC_DEFINE([HAVE_IF_PACKET], [1],
-                [Define to 1 if net/if_packet.h is available.])
-   fi])
-
 dnl Checks for net/if_dl.h.
 dnl
 dnl (We use this as a proxy for checking whether we're building on FreeBSD
diff --git a/configure.ac b/configure.ac
index aa92b151a28b..2b3800310231 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,7 +96,6 @@  OVS_CHECK_PYTHON
 OVS_CHECK_FLAKE8
 OVS_CHECK_SPHINX
 OVS_CHECK_DOT
-OVS_CHECK_IF_PACKET
 OVS_CHECK_IF_DL
 OVS_CHECK_STRTOK_R
 AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]])
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 3c6eb48ead8c..f86dcd06e563 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -39,7 +39,6 @@ 
 #include <netpacket/packet.h>
 #include <net/if.h>
 #include <net/if_arp.h>
-#include <net/if_packet.h>
 #include <net/route.h>
 #include <poll.h>
 #include <stdlib.h>