diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-05-24 11:32:53 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-05-24 11:32:53 +0000 |
commit | bc91f60fc288fe1fd0729f7bafe0596837c3e675 (patch) | |
tree | 5e36e8e4c64295ab5d9a30e8625358f2c6a876d7 /src/mcast.c | |
parent | eaae45fa65fdb559b5442dfe2da05a808c5c57ba (diff) | |
download | conntrack-tools-bc91f60fc288fe1fd0729f7bafe0596837c3e675.tar.gz conntrack-tools-bc91f60fc288fe1fd0729f7bafe0596837c3e675.zip |
simplify checksum code: use UDP/multicast checksum facilities
Diffstat (limited to 'src/mcast.c')
-rw-r--r-- | src/mcast.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mcast.c b/src/mcast.c index 9904544..85992fb 100644 --- a/src/mcast.c +++ b/src/mcast.c @@ -192,6 +192,14 @@ struct mcast_sock *mcast_client_create(struct mcast_conf *conf) return NULL; } + if (setsockopt(m->fd, SOL_SOCKET, SO_NO_CHECK, &conf->checksum, + sizeof(int)) == -1) { + debug("mcast_sock_client_create:setsockopt1"); + close(m->fd); + free(m); + return NULL; + } + switch(conf->ipproto) { case AF_INET: ret = __mcast_client_create_ipv4(m, conf); |