From 15daf59068ebd954673cdf379a6c27fe805b3fcf Mon Sep 17 00:00:00 2001
From: Phil <phil@secdev.org>
Date: Fri, 15 Aug 2008 16:27:00 +0200
Subject: [PATCH] Added UDP/BOOTP binding for bootp relay (ticket #106)

---
 scapy/layers/dhcp.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scapy/layers/dhcp.py b/scapy/layers/dhcp.py
index c6852626..8f45d820 100644
--- a/scapy/layers/dhcp.py
+++ b/scapy/layers/dhcp.py
@@ -252,7 +252,9 @@ class DHCP(Packet):
 
 bind_layers( UDP,           BOOTP,         dport=67, sport=68)
 bind_layers( UDP,           BOOTP,         dport=68, sport=67)
+bind_bottom_up( UDP, BOOTP, dport=67, sport=67)
 bind_layers( BOOTP,         DHCP,          options='c\x82Sc')
+
 def dhcp_request(iface=None,**kargs):
     if conf.checkIPaddr != 0:
         warning("conf.checkIPaddr is not 0, I may not be able to match the answer")
-- 
GitLab