throws NetworkException { configureNetwork(device, msg.getHeader()); byte[] routerValue = msg.getOption(DHCPMessage.ROUTER_OPTION); if (routerValue != null && routerValue.length >= 4) { IPv4Address routerIP = new IPv4Address(routerValue, 0); log.info("Got Router IP address : " + routerIP); final IPv4ConfigurationService cfg; try { cfg = (IPv4ConfigurationService) InitialNaming .lookup(IPv4ConfigurationService.NAME); } catch (NameNotFoundException ex) { throw new NetworkException(ex); } cfg.addRoute(IPv4Address.ANY, routerIP, device, false); }
throws NetworkException { configureNetwork(device, msg.getHeader()); byte[] routerValue = msg.getOption(DHCPMessage.ROUTER_OPTION); if (routerValue != null && routerValue.length >= 4) { IPv4Address routerIP = new IPv4Address(routerValue, 0); log.info("Got Router IP address : " + routerIP); final IPv4ConfigurationService cfg; try { cfg = (IPv4ConfigurationService) InitialNaming .lookup(IPv4ConfigurationService.NAME); } catch (NameNotFoundException ex) { throw new NetworkException(ex); } cfg.addRoute(IPv4Address.ANY, routerIP, device, false);
    protected void configureNetwork(Device device, DHCPMessage msg)            throws NetworkException {        configureNetwork(device, msg.getHeader());        byte[] routerValue = msg.getOption(DHCPMessage.ROUTER_OPTION);        if (routerValue != null && routerValue.length >= 4) {            IPv4Address routerIP = new IPv4Address(routerValue, 0);            log.info("Got Router IP address : " + routerIP);            final IPv4ConfigurationService cfg;            try {                cfg = (IPv4ConfigurationService) InitialNaming                        .lookup(IPv4ConfigurationService.NAME);            } catch (NameNotFoundException ex) {                throw new NetworkException(ex);            }            cfg.addRoute(IPv4Address.ANY, routerIP, device, false);        }    }