diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-31 10:36:35 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:21 +0800 |
commit | 078321aaae03fbe859f95c05f70bcf578cec539b (patch) | |
tree | a099894a33a107481ca070b0540dd8449e37dfde /openbsc/src/nat/bsc_nat.c | |
parent | ca999a989d972ba79902251cbb74956732e91bf9 (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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index 3b3bf6964..53b888294 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 */ |