From: Marek Lindner <mareklindner@neomailbox.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH v3 1/2] batman-adv: Snoop DHCPACKs for DAT
Date: Sun, 13 May 2018 06:26:05 +0800 [thread overview]
Message-ID: <8297905.x1mjbtJKAa@lafayette> (raw)
In-Reply-To: <20180507013823.739-2-linus.luessing@c0d3.blue>
[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]
On Monday, May 7, 2018 9:38:22 AM HKT Linus Lüssing wrote:
> include/uapi/linux/batadv_packet.h | 48 ++++++
> net/batman-adv/distributed-arp-table.c | 296
> +++++++++++++++++++++++++++++++++ net/batman-adv/distributed-arp-table.h |
> 11 ++
> net/batman-adv/soft-interface.c | 11 +-
> 4 files changed, 364 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/batadv_packet.h
> b/include/uapi/linux/batadv_packet.h index 894d8d2f..7ef7b519 100644
> --- a/include/uapi/linux/batadv_packet.h
> +++ b/include/uapi/linux/batadv_packet.h
> @@ -630,6 +630,54 @@ struct batadv_tvlv_mcast_data {
> __u8 reserved[3];
> };
>
> +enum batadv_bootpop {
> + BATADV_BOOTREQUEST = 1,
> + BATADV_BOOTREPLY = 2,
> +};
> +
> +enum batadv_boothtype {
> + BATADV_HTYPE_ETHERNET = 1,
> +};
> +
> +enum batadv_dhcpoptioncode {
> + BATADV_DHCP_OPT_PAD = 0,
> + BATADV_DHCP_OPT_MSG_TYPE = 53,
> + BATADV_DHCP_OPT_END = 255,
> +};
> +
> +enum batadv_dhcptype {
> + BATADV_DHCPDISCOVER = 1,
> + BATADV_DHCPOFFER = 2,
> + BATADV_DHCPREQUEST = 3,
> + BATADV_DHCPDECLINE = 4,
> + BATADV_DHCPACK = 5,
> + BATADV_DHCPNAK = 6,
> + BATADV_DHCPRELEASE = 7,
> + BATADV_DHCPINFORM = 8,
> +};
Can we shorten these definitions by only listing those that are used by the
code below ?
> @@ -1130,6 +1133,7 @@ batadv_dat_arp_create_reply(struct batadv_priv
> *bat_priv, __be32 ip_src, return NULL;
>
> skb_reset_mac_header(skb);
> + skb_set_network_header(skb, ETH_HLEN);
>
> if (vid & BATADV_VLAN_HAS_TAG)
> skb = vlan_insert_tag(skb, htons(ETH_P_8021Q),
Might be better to move the skb_set_network_header() call into
batadv_dat_put_pairs() where it is needed by skb_network_offset() ?
Cheers,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-05-12 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 1:38 [B.A.T.M.A.N.] [PATCH v3 0/2] batman-adv: DHCP snooping for DAT Linus Lüssing
2018-05-07 1:38 ` [B.A.T.M.A.N.] [PATCH v3 1/2] batman-adv: Snoop DHCPACKs " Linus Lüssing
2018-05-12 22:26 ` Marek Lindner [this message]
2018-05-07 1:38 ` [B.A.T.M.A.N.] [PATCH v3 2/2] batman-adv: Introduce no noflood mark Linus Lüssing
2018-05-08 19:13 ` [B.A.T.M.A.N.] [PATCH v3 0/2] batman-adv: DHCP snooping for DAT Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8297905.x1mjbtJKAa@lafayette \
--to=mareklindner@neomailbox.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox