Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-10-17 16:19:43 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
18dbb7e7a79474f247ead3adfaec466a9bf9e143
18dbb7e7
2 parents
875d626c
d57df6c3
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
apps/sdnip/src/main/java/org/onlab/onos/sdnip/Router.java
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowEntryBuilder.java
tools/dev/bash_profile
apps/sdnip/src/main/java/org/onlab/onos/sdnip/Router.java
View file @
18dbb7e
...
...
@@ -133,6 +133,10 @@ public class Router implements RouteListener {
*/
public
void
start
()
{
// TODO hack to enable SDN-IP now for testing
isElectedLeader
=
true
;
isActivatedLeader
=
true
;
bgpUpdatesExecutor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
...
...
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowEntryBuilder.java
View file @
18dbb7e
...
...
@@ -35,6 +35,7 @@ import org.projectfloodlight.openflow.protocol.instruction.OFInstructionApplyAct
import
org.projectfloodlight.openflow.protocol.match.Match
;
import
org.projectfloodlight.openflow.protocol.match.MatchField
;
import
org.projectfloodlight.openflow.types.IPv4Address
;
import
org.projectfloodlight.openflow.types.Masked
;
import
org.slf4j.Logger
;
import
com.google.common.collect.Lists
;
...
...
@@ -218,23 +219,35 @@ public class FlowEntryBuilder {
builder
.
matchEthType
((
short
)
ethType
);
break
;
case
IPV4_DST:
IPv4Address
di
=
match
.
get
(
MatchField
.
IPV4_DST
);
IpPrefix
dip
;
if
(
di
.
isCidrMask
())
{
dip
=
IpPrefix
.
valueOf
(
di
.
getInt
(),
di
.
asCidrMaskLength
());
if
(
match
.
isPartiallyMasked
(
MatchField
.
IPV4_DST
))
{
Masked
<
IPv4Address
>
maskedIp
=
match
.
getMasked
(
MatchField
.
IPV4_DST
);
dip
=
IpPrefix
.
valueOf
(
maskedIp
.
getValue
().
getInt
(),
maskedIp
.
getMask
().
asCidrMaskLength
());
}
else
{
dip
=
IpPrefix
.
valueOf
(
di
.
getInt
(),
IpPrefix
.
MAX_INET_MASK
);
dip
=
IpPrefix
.
valueOf
(
match
.
get
(
MatchField
.
IPV4_DST
).
getInt
(),
IpPrefix
.
MAX_INET_MASK
);
}
builder
.
matchIPDst
(
dip
);
break
;
case
IPV4_SRC:
IPv4Address
si
=
match
.
get
(
MatchField
.
IPV4_SRC
);
IpPrefix
sip
;
if
(
si
.
isCidrMask
())
{
sip
=
IpPrefix
.
valueOf
(
si
.
getInt
(),
si
.
asCidrMaskLength
());
if
(
match
.
isPartiallyMasked
(
MatchField
.
IPV4_SRC
))
{
Masked
<
IPv4Address
>
maskedIp
=
match
.
getMasked
(
MatchField
.
IPV4_SRC
);
sip
=
IpPrefix
.
valueOf
(
maskedIp
.
getValue
().
getInt
(),
maskedIp
.
getMask
().
asCidrMaskLength
());
}
else
{
sip
=
IpPrefix
.
valueOf
(
si
.
getInt
(),
IpPrefix
.
MAX_INET_MASK
);
sip
=
IpPrefix
.
valueOf
(
match
.
get
(
MatchField
.
IPV4_SRC
).
getInt
(),
IpPrefix
.
MAX_INET_MASK
);
}
builder
.
matchIPSrc
(
sip
);
break
;
case
IP_PROTO:
...
...
tools/dev/bash_profile
View file @
18dbb7e
...
...
@@ -45,6 +45,7 @@ alias pub='onos-push-update-bundle'
# Short-hand for tailing the ONOS (karaf) log
alias
tl
=
'$ONOS_ROOT/tools/dev/bin/onos-local-log'
alias
tlo
=
'tl | grep --colour=always org.onlab'
alias
ll
=
'less $KARAF_LOG'
# Pretty-print JSON output
alias
pp
=
'python -m json.tool'
...
...
Please
register
or
login
to post a comment