Skip to content

Commit

Permalink
libsystemd-networkd: introduce sd-pppoe library
Browse files Browse the repository at this point in the history
This library negotiates a PPPoE channel. It handles the discovery stage and
leaves the session stage to the kernel. A further PPP library is needed to
actually set up a PPP unit (negotatie LCP, IPCP and do authentication), so in
isolation this is not yet very useful.

The test program has two modes:

  # ./test-pppoe

will create a veth tunnel in a new network namespace, start pppoe-server on one
end and this client library on the other. The pppd server will time out as no
LCP is performed, and the client will then shut down gracefully.

  # ./test-pppoe eth0

will run the client on eth0 (or any other netdev), and requires a PPPoE server
to be reachable on the local link.
  • Loading branch information
teg committed Nov 1, 2014
1 parent ea55caa commit cda391c
Show file tree
Hide file tree
Showing 5 changed files with 1,056 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
/test-dhcp-option
/test-dhcp-server
/test-dhcp6-client
/test-pppoe
/test-dns-domain
/test-icmp6-rs
/test-ellipsize
Expand Down
13 changes: 13 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2958,6 +2958,7 @@ libsystemd_network_la_SOURCES = \
src/systemd/sd-icmp6-nd.h \
src/systemd/sd-dhcp6-client.h \
src/systemd/sd-dhcp6-lease.h \
src/systemd/sd-pppoe.h \
src/libsystemd-network/sd-dhcp-client.c \
src/libsystemd-network/sd-dhcp-server.c \
src/libsystemd-network/dhcp-network.c \
Expand All @@ -2972,6 +2973,7 @@ libsystemd_network_la_SOURCES = \
src/libsystemd-network/ipv4ll-network.c \
src/libsystemd-network/ipv4ll-packet.c \
src/libsystemd-network/ipv4ll-internal.h \
src/libsystemd-network/sd-pppoe.c \
src/libsystemd-network/network-internal.c \
src/libsystemd-network/network-internal.h \
src/libsystemd-network/sd-icmp6-nd.c \
Expand Down Expand Up @@ -3031,6 +3033,14 @@ test_ipv4ll_LDADD = \
libsystemd-internal.la \
libsystemd-shared.la

test_pppoe_SOURCES = \
src/systemd/sd-pppoe.h \
src/libsystemd-network/test-pppoe.c

test_pppoe_LDADD = \
libsystemd-network.la \
libsystemd-shared.la

test_icmp6_rs_SOURCES = \
src/systemd/sd-dhcp6-client.h \
src/systemd/sd-icmp6-nd.h \
Expand Down Expand Up @@ -3060,6 +3070,9 @@ tests += \
test-icmp6-rs \
test-dhcp6-client

manual_tests += \
test-pppoe

# ------------------------------------------------------------------------------
if ENABLE_TERMINAL
noinst_LTLIBRARIES += \
Expand Down
Loading

0 comments on commit cda391c

Please sign in to comment.