From 86f648a7b90fccde400aab7a3e63a0bfbcabf2e0 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Thu, 12 Dec 2013 22:23:20 +0400 Subject: ipoe: fixed parsing 'range' option Signed-off-by: Dmitry Kozlov --- accel-pppd/ctrl/ipoe/dhcpv4.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c index 12ba95c7..c603c5f1 100644 --- a/accel-pppd/ctrl/ipoe/dhcpv4.c +++ b/accel-pppd/ctrl/ipoe/dhcpv4.c @@ -183,9 +183,8 @@ struct dhcpv4_serv *dhcpv4_create(struct triton_context_t *ctx, const char *ifna serv->hnd.read = dhcpv4_read; serv->ifindex = ifindex; - str0 = opt ? strchr(opt, ',') : NULL; - if (str0) { - str0 = _strdup(str0 + 1); + if (opt) { + str0 = _strdup(opt); str = str0; while (1) { -- cgit v1.2.3