summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMichael Haro <mharo@google.com>2016-07-27 14:25:49 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-27 14:25:49 +0900
commitc631c46163d0b484daaeaf4d951581cdf9820fc4 (patch)
tree176eff253d7e489a6bf48da4274962d5f2030800
parent99d641c7d406833b76530910362db686c2e461da (diff)
packet: support relayed DHCP packet
https://tools.ietf.org/html/draft-ietf-dhc-implementation-02#section-4.7.2 states that DHCP relays should use source port 67 and dest port 67. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/packet/udp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ryu/lib/packet/udp.py b/ryu/lib/packet/udp.py
index b67bd1a4..f39fb901 100644
--- a/ryu/lib/packet/udp.py
+++ b/ryu/lib/packet/udp.py
@@ -53,7 +53,9 @@ class udp(packet_base.PacketBase):
@staticmethod
def get_packet_type(src_port, dst_port):
if ((src_port == 68 and dst_port == 67) or
- (src_port == 67 and dst_port == 68)):
+ (src_port == 67 and dst_port == 68) or
+ (src_port == 67 and
+ dst_port == 67)):
return dhcp.dhcp
if (dst_port == vxlan.UDP_DST_PORT or
dst_port == vxlan.UDP_DST_PORT_OLD):