aboutsummaryrefslogtreecommitdiffstats
path: root/bpf.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-07-23 16:45:46 -0700
committerDmitry Shmidt <dimitrysh@google.com>2012-07-23 16:54:15 -0700
commita3a2260384a906e1674c7498c2f479e9f37bc503 (patch)
tree5e5adc874a930144f847f57a08da862413b63668 /bpf.c
parent2af699ea51cca49bd0f19080c9d73170e5bdadbc (diff)
downloadexternal_dhcpcd-a3a2260384a906e1674c7498c2f479e9f37bc503.zip
external_dhcpcd-a3a2260384a906e1674c7498c2f479e9f37bc503.tar.gz
external_dhcpcd-a3a2260384a906e1674c7498c2f479e9f37bc503.tar.bz2
dhcpcd: Update to Version 5.5.6
Change-Id: I98c378688be723a2a602ec17c26bc13f2fd83cc8 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'bpf.c')
-rw-r--r--bpf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bpf.c b/bpf.c
index beda1ba..1c30c76 100644
--- a/bpf.c
+++ b/bpf.c
@@ -1,6 +1,6 @@
/*
* dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2008 Roy Marples <roy@marples.name>
+ * Copyright (c) 2006-2011 Roy Marples <roy@marples.name>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -160,7 +160,7 @@ send_raw_packet(const struct interface *iface, int protocol,
* So we pass the buffer in the API so we can loop on >1 packet. */
ssize_t
get_raw_packet(struct interface *iface, int protocol,
- void *data, ssize_t len)
+ void *data, ssize_t len, int *partialcsum)
{
int fd = -1;
struct bpf_hdr packet;
@@ -172,6 +172,9 @@ get_raw_packet(struct interface *iface, int protocol,
else
fd = iface->raw_fd;
+ if (partialcsum != NULL)
+ *partialcsum = 0; /* Not supported on BSD */
+
for (;;) {
if (iface->buffer_len == 0) {
bytes = read(fd, iface->buffer, iface->buffer_size);