aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-31 10:36:35 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-31 10:36:35 +0800
commitca660ac9caff1cbf15e9bfa1820f49575f3a1f77 (patch)
tree75af0951f688d6a5ff159ae932d53f8caf03c502 /openbsc/src/nat/bsc_nat.c
parent96d6ed25525dbf91cc369133e4942960c8307f2a (diff)
[nat] Add ip-tos option to the nat.
This is applied to all incoming BSC connections.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index a10510e8d..de24fd3f5 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -872,6 +872,11 @@ static int ipaccess_listen_bsc_cb(struct bsc_fd *bfd, unsigned int what)
if (rc != 0)
LOGP(DNAT, LOGL_ERROR, "Failed to set TCP_NODELAY: %s\n", strerror(errno));
+ rc = setsockopt(fd, IPPROTO_IP, IP_TOS,
+ &nat->bsc_ip_tos, sizeof(nat->bsc_ip_tos));
+ if (rc != 0)
+ LOGP(DNAT, LOGL_ERROR, "Failed to set IP_TOS: %s\n", strerror(errno));
+
/* todo... do something with the connection */
/* todo... use GNUtls to see if we want to trust this as a BTS */