From b9c8603931203f5d94091f7a05a5967304b62fbd Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 20 Apr 2014 04:36:34 +0200 Subject: Make conf global --- src/socket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/socket.c') diff --git a/src/socket.c b/src/socket.c index a1e0d02..70ff17a 100644 --- a/src/socket.c +++ b/src/socket.c @@ -93,8 +93,8 @@ static int bind_socket(fastd_context_t *ctx, const fastd_bind_address_t *addr, b #endif #ifdef USE_PMTU - if (ctx->conf->pmtu.set) { - int pmtu = ctx->conf->pmtu.state ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; + if (conf.pmtu.set) { + int pmtu = conf.pmtu.state ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; if (setsockopt(fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu))) { pr_error_errno(ctx, "setsockopt: unable to set PMTU discovery"); goto error; @@ -103,8 +103,8 @@ static int bind_socket(fastd_context_t *ctx, const fastd_bind_address_t *addr, b #endif #ifdef USE_PACKET_MARK - if (ctx->conf->packet_mark) { - if (setsockopt(fd, SOL_SOCKET, SO_MARK, &ctx->conf->packet_mark, sizeof(ctx->conf->packet_mark))) { + if (conf.packet_mark) { + if (setsockopt(fd, SOL_SOCKET, SO_MARK, &conf.packet_mark, sizeof(conf.packet_mark))) { pr_error_errno(ctx, "setsockopt: unable to set packet mark"); goto error; } -- cgit v1.2.3