Skip to content

Commit

Permalink
bpf: fix samples xdp_tx_iptunnel and tc_l2_redirect with fake KBUILD_…
Browse files Browse the repository at this point in the history
…MODNAME

Fix build errors for samples/bpf xdp_tx_iptunnel and tc_l2_redirect,
when dynamic debugging is enabled (CONFIG_DYNAMIC_DEBUG) by defining a
fake KBUILD_MODNAME.

Just like Daniel Borkmann fixed other samples/bpf in commit
96a8eb1 ("bpf: fix samples to add fake KBUILD_MODNAME").

Fixes: 12d8bb6 ("bpf: xdp: Add XDP example for head adjustment")
Fixes: 90e0289 ("bpf: Add test for bpf_redirect to ipip/ip6tnl")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
netoptimizer authored and davem330 committed Jan 20, 2017
1 parent df384d4 commit cdb749c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions samples/bpf/tc_l2_redirect_kern.c
Expand Up @@ -4,6 +4,7 @@
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*/
#define KBUILD_MODNAME "foo"
#include <uapi/linux/bpf.h>
#include <uapi/linux/if_ether.h>
#include <uapi/linux/if_packet.h>
Expand Down
1 change: 1 addition & 0 deletions samples/bpf/xdp_tx_iptunnel_kern.c
Expand Up @@ -8,6 +8,7 @@
* encapsulating the incoming packet in an IPv4/v6 header
* and then XDP_TX it out.
*/
#define KBUILD_MODNAME "foo"
#include <uapi/linux/bpf.h>
#include <linux/in.h>
#include <linux/if_ether.h>
Expand Down

0 comments on commit cdb749c

Please sign in to comment.