1
0
mirror of https://github.com/xdp-project/BNG-router.git synced 2024-05-06 15:54:53 +00:00

5 Commits

Author SHA1 Message Date
Yoel Caspersen
a9003fa266 Reformatting option 82 circuit ID to include interface name (including
VLAN tags) in ASCII format.

Because VLAN tags are converted to ASCII with use of modulo,
interface name is generated from right to left, starting with inner
VLAN and prepended with dash characters to ensure a final length of
IF_NAMESIZE bytes (16), e.g.:

----ens6f0.83.20

We avoid null bytes in circuit ID to ensure compatibility with DHCP
servers that interpret null as string terminator.
2021-10-18 09:20:16 +02:00
Yoel Caspersen
ac9373c82e Increasing IP and UDP length headers to match Ethernet frame tail
adjustment.
Adding map client_vlans which allows matching server responses with 
client requests.
Reformatting Option 82 to include interface name (work in progress,
we need to figure out how to convert VLAN tags to ASCII).
2021-10-17 10:41:06 +02:00
Yoel Caspersen
09bc68580f Moving Option 82 to end of options as per RFC3046 section 2.1.
Adjusting tail instead of headers because of complications with
variable length DHCP options - beware that this doesn't appear to work
with veth interfaces. Use a physical NIC for testing for now.
2021-10-13 20:11:06 +02:00
Toke Høiland-Jørgensen
93da536a2d dhcp-relay: Fix a couple of compile and logic errors
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2021-08-18 14:47:44 +02:00
Toke Høiland-Jørgensen
d38fb6ef73 Import build config and DHCP relay code from bpf-examples
The dhcp-relay utility was initially implemented as part of the
bpf-examples repository, but really belongs here. So import it along with
the build environment from bpf-examples.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2021-08-18 14:40:32 +02:00