0
私は、特定のフローをブロックし、結果的にパケットをドロップするメソッドを実装しようとしています。私はそれにデータパス、ソースipと宛先ipを渡します。アプリはフローを検出しますが、フローは引き続き動作し、送信元はデータを送信し、送信先ホストは受信します。私は間違って何をしていますか?ブロックフロー/ドロップパケットryuコントローラ
def drop_flow(self, datapath, ip_src, ip_dst):
ofproto = datapath.ofproto
parser = datapath.ofproto_parser
match = parser.OFPMatch(ipv4_src=ip_src,
ipv4_dst=ip_dst)
inst = [parser.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS, [])]
mod = parser.OFPFlowMod(datapath=datapath,
command=ofproto.OFPFC_DELETE,
out_port=ofproto.OFPP_ANY,
out_group=ofproto.OFPG_ANY,
match=match, instructions=inst)
print "deleting flow entries in the table "
datapath.send_msg(mod)
ありがとうございます!