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:
Michael Tuexen 2020-09-12 11:19:54 +00:00
parent 3966af52f3
commit 2d0fb1b3c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365657

View File

@ -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);