Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not update IRRDB if only IPv6 is configured. #662

Closed
YukariChiba opened this issue Jul 22, 2020 · 1 comment
Closed

Can not update IRRDB if only IPv6 is configured. #662

YukariChiba opened this issue Jul 22, 2020 · 1 comment

Comments

@YukariChiba
Copy link

ISSUE TYPE

Bug Report

OS

Linux Debian 10 (4.19.0-8-amd64)

VERSION
define( 'APPLICATION_VERSION', '5.6.0' );
define( 'APPLICATION_VERDATE', '2020052300' );
ENVIRONMENT
PHP 7.3.14-1~deb10u1 (cli) (built: Feb 16 2020 15:07:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.14-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

https://gist.github.com/SteveCharlesYang/1d3d6e8f3b86150d30ef18f801957497

CONFIGURATION
APP_DEBUG=true
APP_URL="https://portal.ix42.org"
APP_TIMEZONE="UTC"
APP_LOG="single"
APP_LOG_LEVEL=debug
IXP_FE_FRONTEND_DISABLED_LOOKING_GLASS=false
IXP_RESELLER_ENABLED=false
IXP_AS112_UI_ACTIVE=false
IXP_FE_FRONTEND_DISABLED_LOGO=false
GRAPHER_BACKENDS="dummy"
GRAPHER_CACHE_ENABLED=true
GRAPHER_BACKEND_MRTG_DBTYPE="log"
GRAPHER_BACKEND_SMOKEPING_ENABLED=true
GRAPHER_BACKEND_SMOKEPING_URL="https://smokeping.ix42.org"
IXP_API_JSONEXPORTSCHEMA_PUBLIC=true
CACHE_DRIVER=file
DOCTRINE_PROXY_AUTOGENERATE=false
DOCTRINE_CACHE=file
DOCTRINE_CACHE_NAMESPACE=IXPMANAGERNAMESPACE
IXP_IRRDB_BGPQ3_PATH=/usr/bin/bgpq3
SUMMARY
STEPS TO REPRODUCE
  • Enable IPv6-only VLAN ports for customers.
  • Update IRRDB entiries (ASN / Prefix).
EXPECTED RESULTS
  • There will be new/added IPv6 ASNs and Prefixes.
ACTUAL RESULTS
The IRRDB update process has completed. Customer not a RS client or IRRDB filtered. Prefixes, if any, wiped from database.
There are a total of 0 IPv6 prefixes of which 0 are new and have been added; and 0 are stale and have been removed.
IMPORTANCE

If there is no IPv4 configured at the interface, IRRDB update will fail.

RELEVANT CODES

app/Tasks/Irrdb/UpdateAsnDb.php:49
app/Tasks/Irrdb/UpdatePrefixDb.php:50

if( $this->customer()->isRouteServerClient() && $this->customer()->isIrrdbFiltered() ) {

From app/Models/Customer.php:279:

public function isRouteServerClient( int $proto = 4 ): bool

A possible solution is:

if( $this->customer()->isRouteServerClient() || $this->customer()->isRouteServerClient(6) && $this->customer()->isIrrdbFiltered() ) {
@barryo barryo closed this as completed in ed45c9b Aug 11, 2020
@barryo
Copy link
Member

barryo commented Aug 11, 2020

Thanks @SteveCharlesYang and very close with:

if( $this->customer()->isRouteServerClient() || $this->customer()->isRouteServerClient(6) && $this->customer()->isIrrdbFiltered() ) {

In the end, I moved the proto foreach() loop up a level to achieve the same thing with better messaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants