diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-11-09 23:22:53 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-11-09 23:22:53 +0100 |
commit | 4ac7c8341c660db654821ed2dc0273645dc19645 (patch) | |
tree | 246c5cd54ab5a851a6f7a8397515e0e0f61fbbe7 /sysdep | |
parent | 3f22fa9e74c8643d3e4f7e3a7b4f2aa992ad09f5 (diff) |
Use IPv6 checksums in OSPFv3.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/io.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 3eb2e03c..cd5c5db7 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -782,13 +782,30 @@ int sk_set_broadcast(sock *s, int enable) { if (setsockopt(s->fd, SOL_SOCKET, SO_BROADCAST, &enable, sizeof(enable)) < 0) - log(L_ERR "sk_set_broadcast: SO_BROADCAST: %m"); + { + log(L_ERR "sk_set_broadcast: SO_BROADCAST: %m"); + return -1; + } + + return 0; } #ifdef IPV6 int +sk_set_ipv6_checksum(sock *s, int offset) +{ + if (setsockopt(s->fd, IPPROTO_IPV6, IPV6_CHECKSUM, &offset, sizeof(offset)) < 0) + { + log(L_ERR "sk_set_ipv6_checksum: IPV6_CHECKSUM: %m"); + return -1; + } + + return 0; +} + +int sk_setup_multicast(sock *s) { char *err; |