diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-07-11 13:50:44 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-07-11 13:50:44 +0200 |
commit | 354496ace87341428e6005fbc073fbe57b4e6c0e (patch) | |
tree | 3dae3a53b6e45cd7cb144296d54fda90fff7cc14 /sysdep/unix/io.c | |
parent | cc31b75a8fd7949533c12db2c3e9d67eeaf46d10 (diff) |
Some fixes for TTL security.
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r-- | sysdep/unix/io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 93863885..4fee10e7 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -821,10 +821,10 @@ sk_setup(sock *s) WARN("IPV6_V6ONLY"); #endif - if (s->ttl >= 0) - err = sk_set_ttl_int(s); + if ((s->ttl >= 0) && (err = sk_set_ttl_int(s))) + goto bad; - sysio_register_cmsgs(s); + err = sysio_register_cmsgs(s); bad: return err; } |