summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-06-27 18:00:02 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2023-06-27 18:37:18 +0200
commit083a51f43ae30cd7f1ad1cc9977ca4bedfc35585 (patch)
treeaead7eb76bc800167eb00621fc338eff08ef2379
parent3606825c9664f9139c0fb487ec87d9ba4a889229 (diff)
downloadaccel-ppp-083a51f43ae30cd7f1ad1cc9977ca4bedfc35585.tar.gz
accel-ppp-083a51f43ae30cd7f1ad1cc9977ca4bedfc35585.zip
ipoe: fix memory access violation with unset link-selection
Link-selection pointer is not set to NULL when link-selection IPOE option is not set. It results in a memory access violation in dhcpv4_packet_insert_opt82() Set link-selection pointer to NULL if unset to fix the issue. Fixes: 61e31c591e ("ipoe: add dhcp link selection sub-option") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 4a4f95d..dde3f21 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -4006,6 +4006,8 @@ static void load_config(void)
opt = conf_get_opt("ipoe", "link-selection");
if (opt && inet_pton(AF_INET, opt, &dummy) > 0)
conf_link_selection = opt;
+ else
+ conf_link_selection = NULL;
opt = conf_get_opt("ipoe", "ipv6");
if (opt)