Merge pull request #180 from olerem/jacd

jacd: remove SO_BINDTODEVICE setsockopt call
pull/189/merge
Marc Kleine-Budde 2019-12-06 11:31:53 +01:00 committed by GitHub
commit 6831eeeb62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 7 deletions

7
jacd.c
View File

@ -207,13 +207,6 @@ static int open_socket(const char *device, uint64_t name)
if (ret < 0)
err(1, "socket(j1939)");
if (s.verbose)
fprintf(stderr, "- setsockopt(, SOL_SOCKET, SO_BINDTODEVICE, %s, %zd);\n", device, strlen(device));
ret = setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE,
device, strlen(device));
if (ret < 0)
err(1, "bindtodevice %s", device);
if (s.verbose)
fprintf(stderr, "- setsockopt(, SOL_CAN_J1939, SO_J1939_FILTER, <filter>, %zd);\n", sizeof(filt));
ret = setsockopt(sock, SOL_CAN_J1939, SO_J1939_FILTER,