diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2021-02-08 22:30:39 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2021-02-08 22:32:32 +0000 |
commit | 924d1c9a050d7e355d0562fca62bd2bb9b5f53d7 (patch) | |
tree | 64fc9716256a1d641aeba3256a4fc2c174b52174 /sbin | |
parent | db2f512381ac3c0c227f5c0354690bb929dcac17 (diff) | |
download | src-924d1c9a050d7e355d0562fca62bd2bb9b5f53d7.tar.gz src-924d1c9a050d7e355d0562fca62bd2bb9b5f53d7.zip |
Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors."
Wrong version of the change was pushed inadvertenly.
This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index b16fb6d17a08..51a0c68746a6 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1444,20 +1444,9 @@ monitor(int argc, char *argv[]) interfaces(); exit(0); } - -#ifdef SO_RERROR - n = 1; - if (setsockopt(s, SOL_SOCKET, SO_RERROR, &n, sizeof(n)) == -1) - warn("SO_RERROR"); -#endif - for (;;) { time_t now; - n = read(s, msg, sizeof(msg)); - if (n == -1) { - warn("read"); - continue; - } + n = read(s, msg, 2048); now = time(NULL); (void)printf("\ngot message of size %d on %s", n, ctime(&now)); print_rtmsg((struct rt_msghdr *)(void *)msg, n); |