diff options
author | Susant Sahani <ssahani@users.noreply.github.com> | 2016-11-11 05:04:19 +0530 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-11-10 18:34:19 -0500 |
commit | 9faed222fc92c53b6439f52857403a522cf31bd9 (patch) | |
tree | a365479256c3b507d1d1423300a0a5bf4c0f8ac1 /src/network/networkd-dhcp4.c | |
parent | a1ef6bd1e3e690908f886db0cb639b0015c1b704 (diff) |
networkd: support setting dhcp client listen port (#4631)
Allow setting custom port for the DHCP client to listen on in networkd.
[DHCP]
ListenPort=6677
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 76d3d132ea..3feb158642 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -630,6 +630,12 @@ int dhcp4_configure(Link *link) { return r; } + if (link->network->dhcp_client_port) { + r = sd_dhcp_client_set_client_port(link->dhcp_client, link->network->dhcp_client_port); + if (r < 0) + return r; + } + switch (link->network->dhcp_client_identifier) { case DHCP_CLIENT_ID_DUID: { /* If configured, apply user specified DUID and/or IAID */ |