Simplify code, no functional change.
Since https://svnweb.freebsd.org/base?view=revision&revision=365378 UDP is handled the same way as SCTP and TCP (using a raw socket). Therefore use the same code path.
This commit is contained in:
parent
3966af52f3
commit
2d0fb1b3c1
@ -568,15 +568,10 @@ main(int argc, char *argv[])
|
||||
case IPPROTO_ICMPV6:
|
||||
sndsock = rcvsock;
|
||||
break;
|
||||
case IPPROTO_UDP:
|
||||
if ((sndsock = socket(AF_INET6, SOCK_RAW, IPPROTO_UDP)) < 0) {
|
||||
perror("socket(SOCK_RAW)");
|
||||
exit(5);
|
||||
}
|
||||
break;
|
||||
case IPPROTO_NONE:
|
||||
case IPPROTO_SCTP:
|
||||
case IPPROTO_TCP:
|
||||
case IPPROTO_UDP:
|
||||
if ((sndsock = socket(AF_INET6, SOCK_RAW, useproto)) < 0) {
|
||||
perror("socket(SOCK_RAW)");
|
||||
exit(5);
|
||||
|
Loading…
Reference in New Issue
Block a user