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
Jonathan Hart
2014-10-17 11:48:32 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7d1ad60622dc6043941b477b5ef967f44e916873
7d1ad606
1 parent
38c42ede
Explicitly set address length when creating a new host
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java
providers/openflow/host/src/main/java/org/onlab/onos/provider/of/host/impl/OpenFlowHostProvider.java
core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java
View file @
7d1ad60
...
...
@@ -167,6 +167,7 @@ public class ProxyArpManager implements ProxyArpService {
return
;
}
// TODO find the correct IP address
Ethernet
arpReply
=
buildArpReply
(
dst
.
ipAddresses
().
iterator
().
next
(),
dst
.
mac
(),
eth
);
// TODO: check send status with host service.
...
...
providers/openflow/host/src/main/java/org/onlab/onos/provider/of/host/impl/OpenFlowHostProvider.java
View file @
7d1ad60
package
org
.
onlab
.
onos
.
provider
.
of
.
host
.
impl
;
import
static
org
.
onlab
.
onos
.
net
.
DeviceId
.
deviceId
;
import
static
org
.
onlab
.
onos
.
net
.
PortNumber
.
portNumber
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
org.apache.felix.scr.annotations.Activate
;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
...
...
@@ -29,10 +33,6 @@ import org.onlab.packet.IpPrefix;
import
org.onlab.packet.VlanId
;
import
org.slf4j.Logger
;
import
static
org
.
onlab
.
onos
.
net
.
DeviceId
.
deviceId
;
import
static
org
.
onlab
.
onos
.
net
.
PortNumber
.
portNumber
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
/**
* Provider which uses an OpenFlow controller to detect network
* end-station hosts.
...
...
@@ -110,14 +110,16 @@ public class OpenFlowHostProvider extends AbstractProvider implements HostProvid
// Potentially a new or moved host
if
(
eth
.
getEtherType
()
==
Ethernet
.
TYPE_ARP
)
{
ARP
arp
=
(
ARP
)
eth
.
getPayload
();
IpPrefix
ip
=
IpPrefix
.
valueOf
(
arp
.
getSenderProtocolAddress
());
IpPrefix
ip
=
IpPrefix
.
valueOf
(
arp
.
getSenderProtocolAddress
(),
IpPrefix
.
MAX_INET_MASK
);
HostDescription
hdescr
=
new
DefaultHostDescription
(
eth
.
getSourceMAC
(),
vlan
,
hloc
,
ip
);
providerService
.
hostDetected
(
hid
,
hdescr
);
}
else
if
(
ipLearn
&&
eth
.
getEtherType
()
==
Ethernet
.
TYPE_IPV4
)
{
IPv4
pip
=
(
IPv4
)
eth
.
getPayload
();
IpPrefix
ip
=
IpPrefix
.
valueOf
(
pip
.
getSourceAddress
());
IpPrefix
ip
=
IpPrefix
.
valueOf
(
pip
.
getSourceAddress
(),
IpPrefix
.
MAX_INET_MASK
);
HostDescription
hdescr
=
new
DefaultHostDescription
(
eth
.
getSourceMAC
(),
vlan
,
hloc
,
ip
);
providerService
.
hostDetected
(
hid
,
hdescr
);
...
...
Please
register
or
login
to post a comment