openflow/learn_flow_spec: Fix to use src field if dst field is omitted, as dst field.
This commit is contained in:
parent
6ce014ea91
commit
6dc3cfd500
3 changed files with 34 additions and 33 deletions
|
|
@ -29,8 +29,8 @@ defmodule Openflow.Action.NxFlowSpecMatch do
|
|||
dst_offset: non_neg_integer()
|
||||
) :: t()
|
||||
def new(options \\ []) do
|
||||
dst = options[:dst] || raise ":dst must be specified"
|
||||
src = options[:src] || raise ":src must be specified"
|
||||
dst = options[:dst] || src
|
||||
n_bits = options[:n_bits] || Openflow.Match.n_bits_of(dst)
|
||||
|
||||
%NxFlowSpecMatch{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue