Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Antonio Francisco <[email protected]>
  • Loading branch information
cmagnobarbosa and Antonio Francisco authored Apr 13, 2021
1 parent eb4e133 commit d19cab5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions match.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def match13_no_strict(flow_to_install, stored_flow_dict):
Return the flow if any fields match, otherwise, return False.
"""
if flow_to_install.get('cookie_mask') and 'cookie' in stored_flow_dict:
cookie = flow_to_install['cookie_mask'] & flow_to_install['cookie']
stored_cookie = stored_flow_dict['cookie'] & flow_to_install['cookie']
cookie = flow_to_install['cookie'] & flow_to_install['cookie_mask']
stored_cookie = stored_flow_dict['cookie'] & flow_to_install['cookie_mask']
if cookie == stored_cookie:
return stored_flow_dict
return False
Expand Down

0 comments on commit d19cab5

Please sign in to comment.