Command "resolve" don't return the ip address

Hi,

I’ve upgraded from a rb3011, v.6.48.1, to a rb4011, also 6.48.1, but one of my script is not working anymore.

It used the command “resolve” to get an IP address, but resolve now return “blank” answer instead of an IP address, it only returns a result when the domain name is bogus.

[user@router] > :resolve yahoo.com
[user@router] > :resolve google.com
[user@router] > :resolve > www.cnn.com
[user@router] > :resolve ketchup.com
[user@router] > :resolve anythingatall.ca
failure: dns name does not exist
[user@router] >

Any idea on how to fix that?

Thank you.

Has always been like that. You need to use the return value.

:put [ :resolve yahoo.com ]

This is due to that most of the commands does not give output directly to cli.

Try

:put [:resolve yahoo.com]

Or like this:

{
:local test [:resolve yahoo.com]
:put $test
}

Thanks, I thought I found out the reason of the script not working, but it wasn’t that, you’re totally right.

I found out why it didn’t work thanks to you guys, a problem with a bad character inside a variable declaration of the web page.

Turns out that using a “$” inside a web page address is a bad thing if you don’t put "" in front.

Thanks guys, you’ve helped a lot :smiley: