summaryrefslogtreecommitdiff
path: root/common/upf.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1999-02-14 19:04:05 +0000
committerTed Lemon <source@isc.org>1999-02-14 19:04:05 +0000
commitd2bc90bd806d7c8d455b6d4767201079c841e359 (patch)
tree3f9789c41a05a4f125340b267af739d5474e2fe6 /common/upf.c
parent4b447dc7cdb174712fd5a514ecdbb6862ad59907 (diff)
downloadisc-dhcp-d2bc90bd806d7c8d455b6d4767201079c841e359.tar.gz
Pull up recent 2.0 changes.
Diffstat (limited to 'common/upf.c')
-rw-r--r--common/upf.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/common/upf.c b/common/upf.c
index 498b6e6c..fea90fb8 100644
--- a/common/upf.c
+++ b/common/upf.c
@@ -3,8 +3,8 @@
Ultrix PacketFilter interface code.
/*
- * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 1995, 1996, 1997, 1998, 1999
+ * The Internet Software Consortium. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: upf.c,v 1.3 1997/10/20 21:47:15 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.4 1999/02/14 18:57:19 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -232,6 +232,10 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
unsigned char buf [256];
struct iovec iov [2];
+ if (!strcmp (interface -> name, "fallback"))
+ return send_fallback (interface, packet, raw,
+ len, from, to, hto);
+
/* Assemble the headers... */
assemble_hw_header (interface, buf, &bufp, hto);
assemble_udp_ip_header (interface, buf, &bufp, from.s_addr,
@@ -295,4 +299,20 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
memcpy (buf, &ibuf [bufix], length);
return length;
}
+
+int can_unicast_without_arp ()
+{
+ return 1;
+}
+
+void maybe_setup_fallback ()
+{
+ struct interface_info *fbi;
+ fbi = setup_fallback ();
+ if (fbi) {
+ if_register_fallback (fbi);
+ add_protocol ("fallback", fallback_interface -> wfdesc,
+ fallback_discard, fallback_interface);
+ }
+}
#endif